add some protection so it works if currentUser is missing somehow
This commit is contained in:
parent
bc75010b20
commit
835bedca67
|
@ -5,8 +5,10 @@ const TopicCategoryComponent = Ember.Component.extend({
|
||||||
secondRowItems: function() { return []; }.property(),
|
secondRowItems: function() { return []; }.property(),
|
||||||
|
|
||||||
pmPath: function() {
|
pmPath: function() {
|
||||||
return this.get('currentUser').pmPath(this.get('topic'));
|
var currentUser = this.get('currentUser');
|
||||||
|
return currentUser && currentUser.pmPath(this.get('topic'));
|
||||||
}.property('topic'),
|
}.property('topic'),
|
||||||
|
|
||||||
showPrivateMessageGlyph: function() {
|
showPrivateMessageGlyph: function() {
|
||||||
return !this.get('topic.is_warning') && this.get('topic.isPrivateMessage');
|
return !this.get('topic.is_warning') && this.get('topic.isPrivateMessage');
|
||||||
}.property('topic.is_warning', 'topic.isPrivateMessage'),
|
}.property('topic.is_warning', 'topic.isPrivateMessage'),
|
||||||
|
|
Loading…
Reference in New Issue