mirror of
https://github.com/discourse/discourse.git
synced 2025-02-06 19:38:24 +00:00
FIX: decoratorHelper.widget
is not always present
This commit is contained in:
parent
acce7330a3
commit
b005a84530
@ -16,8 +16,14 @@ export default class PostCooked {
|
||||
this.attrs = attrs;
|
||||
this.expanding = false;
|
||||
this._highlighted = false;
|
||||
this.decoratorHelper = decoratorHelper;
|
||||
this.currentUser = decoratorHelper.widget.currentUser;
|
||||
|
||||
if (decoratorHelper) {
|
||||
this.decoratorHelper = decoratorHelper;
|
||||
if (decoratorHelper.widget && decoratorHelper.currentUser) {
|
||||
this.currentUser = decoratorHelper.currentUser;
|
||||
}
|
||||
}
|
||||
|
||||
this.ignoredUsers = this.currentUser
|
||||
? this.currentUser.ignored_users
|
||||
: null;
|
||||
|
Loading…
x
Reference in New Issue
Block a user