From ee01c275fb5c778ff0f329e17be657802a54de63 Mon Sep 17 00:00:00 2001
From: Robin Ward <robin.ward@gmail.com>
Date: Fri, 20 May 2016 16:08:42 -0400
Subject: [PATCH] FIX: Anonymous timeline bug

---
 app/assets/javascripts/discourse/widgets/topic-timeline.js.es6 | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/app/assets/javascripts/discourse/widgets/topic-timeline.js.es6 b/app/assets/javascripts/discourse/widgets/topic-timeline.js.es6
index 2ab684a14..a3a64d8ee 100644
--- a/app/assets/javascripts/discourse/widgets/topic-timeline.js.es6
+++ b/app/assets/javascripts/discourse/widgets/topic-timeline.js.es6
@@ -210,7 +210,8 @@ export default createWidget('topic-timeline', {
       }));
     }
 
-    if (this.currentUser.get('canManageTopic')) {
+    const { currentUser } = this;
+    if (currentUser && currentUser.get('canManageTopic')) {
       controls.push(this.attach('topic-admin-menu-button', { topic }));
     }