mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
add some protection so it works if currentUser is missing somehow
This commit is contained in:
@@ -5,8 +5,10 @@ const TopicCategoryComponent = Ember.Component.extend({
|
||||
secondRowItems: function() { return []; }.property(),
|
||||
|
||||
pmPath: function() {
|
||||
return this.get('currentUser').pmPath(this.get('topic'));
|
||||
var currentUser = this.get('currentUser');
|
||||
return currentUser && currentUser.pmPath(this.get('topic'));
|
||||
}.property('topic'),
|
||||
|
||||
showPrivateMessageGlyph: function() {
|
||||
return !this.get('topic.is_warning') && this.get('topic.isPrivateMessage');
|
||||
}.property('topic.is_warning', 'topic.isPrivateMessage'),
|
||||
|
||||
Reference in New Issue
Block a user