diff --git a/app/assets/javascripts/discourse/widgets/topic-timeline.js.es6 b/app/assets/javascripts/discourse/widgets/topic-timeline.js.es6 index 2ab684a14c8..a3a64d8ee15 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 })); }