mirror of
https://github.com/discourse/discourse.git
synced 2025-04-28 06:34:33 +08: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.attrs = attrs;
|
||||||
this.expanding = false;
|
this.expanding = false;
|
||||||
this._highlighted = false;
|
this._highlighted = false;
|
||||||
|
|
||||||
|
if (decoratorHelper) {
|
||||||
this.decoratorHelper = decoratorHelper;
|
this.decoratorHelper = decoratorHelper;
|
||||||
this.currentUser = decoratorHelper.widget.currentUser;
|
if (decoratorHelper.widget && decoratorHelper.currentUser) {
|
||||||
|
this.currentUser = decoratorHelper.currentUser;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
this.ignoredUsers = this.currentUser
|
this.ignoredUsers = this.currentUser
|
||||||
? this.currentUser.ignored_users
|
? this.currentUser.ignored_users
|
||||||
: null;
|
: null;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user