mirror of
https://github.com/codeninjasllc/discourse.git
synced 2025-02-17 04:01:29 -05:00
add some protection so it works if currentUser is missing somehow
This commit is contained in:
parent
bc75010b20
commit
835bedca67
1 changed files with 3 additions and 1 deletions
|
@ -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'),
|
||||
|
|
Loading…
Reference in a new issue