FIX: `decoratorHelper.widget` is not always present

FIX: decoratorHelper.widget is not always present

diff --git a/app/assets/javascripts/discourse/widgets/post-cooked.js.es6 b/app/assets/javascripts/discourse/widgets/post-cooked.js.es6
index f28f1f6..e0541dc 100644
--- a/app/assets/javascripts/discourse/widgets/post-cooked.js.es6
+++ b/app/assets/javascripts/discourse/widgets/post-cooked.js.es6
@@ -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;

GitHub sha: b005a845