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;
|
||||
|
||||
if (decoratorHelper) {
|
||||
this.decoratorHelper = decoratorHelper;
|
||||
this.currentUser = decoratorHelper.widget.currentUser;
|
||||
if (decoratorHelper.widget && decoratorHelper.currentUser) {
|
||||
this.currentUser = decoratorHelper.currentUser;
|
||||
}
|
||||
}
|
||||
|
||||
this.ignoredUsers = this.currentUser
|
||||
? this.currentUser.ignored_users
|
||||
: null;
|
||||
|
|
Loading…
Reference in New Issue