diff --git a/app/assets/javascripts/discourse/components/show-popup-button.js.es6 b/app/assets/javascripts/discourse/components/show-popup-button.js.es6 index 0e2447e1df7..e082f87d151 100644 --- a/app/assets/javascripts/discourse/components/show-popup-button.js.es6 +++ b/app/assets/javascripts/discourse/components/show-popup-button.js.es6 @@ -11,8 +11,10 @@ export default DButton.extend({ top: position.top }; - // TODO views/topic-footer-buttons is instansiating this via attachViewWithArgs - // attachViewWithArgs + // TODO views/topic-footer-buttons is instantiating this via attachViewWithArgs + // attachViewWithArgs does not set this.appEvents, it is undefined + // this is a workaround but a proper fix probably depends on either deprecation + // of attachViewClass et.el or correction of the methods to hydrate the depndencies this.appEvents = this.appEvents || this.container.lookup('app-events:main'); this.appEvents.trigger("popup-menu:open", loc); this.sendAction("action");