diff --git a/plugins/discourse-details/assets/javascripts/initializers/apply-details.js.es6 b/plugins/discourse-details/assets/javascripts/initializers/apply-details.js.es6 index b3f58c7bc42..f523ae7b903 100644 --- a/plugins/discourse-details/assets/javascripts/initializers/apply-details.js.es6 +++ b/plugins/discourse-details/assets/javascripts/initializers/apply-details.js.es6 @@ -1,4 +1,5 @@ import { withPluginApi } from 'discourse/lib/plugin-api'; +import ComposerController from 'discourse/controllers/composer'; function initializeDetails(api) { api.decorateCooked($elem => $("details", $elem).details()); @@ -11,8 +12,6 @@ function initializeDetails(api) { }; }); - const ComposerController = api.container.lookup("controller:composer"); - ComposerController.reopen({ actions: { insertDetails() { diff --git a/plugins/poll/assets/javascripts/initializers/add-poll-ui-builder.js.es6 b/plugins/poll/assets/javascripts/initializers/add-poll-ui-builder.js.es6 index a5f80d08ddc..61fb332cb99 100644 --- a/plugins/poll/assets/javascripts/initializers/add-poll-ui-builder.js.es6 +++ b/plugins/poll/assets/javascripts/initializers/add-poll-ui-builder.js.es6 @@ -1,9 +1,8 @@ import { withPluginApi } from 'discourse/lib/plugin-api'; import showModal from 'discourse/lib/show-modal'; +import ComposerController from 'discourse/controllers/composer'; function initializePollUIBuilder(api) { - const ComposerController = api.container.lookup("controller:composer"); - ComposerController.reopen({ actions: { showPollBuilder() {