diff --git a/app/assets/javascripts/discourse/widgets/post-cooked.js.es6 b/app/assets/javascripts/discourse/widgets/post-cooked.js.es6 index cf9a4a66e0b..3879e3739a3 100644 --- a/app/assets/javascripts/discourse/widgets/post-cooked.js.es6 +++ b/app/assets/javascripts/discourse/widgets/post-cooked.js.es6 @@ -11,11 +11,11 @@ export function addDecorator(cb) { export default class PostCooked { - constructor(attrs, getModel) { + constructor(attrs, decoratorHelper) { this.attrs = attrs; this.expanding = false; this._highlighted = false; - this.getModel = getModel; + this.decoratorHelper = decoratorHelper; } update(prev) { @@ -31,7 +31,7 @@ export default class PostCooked { this._fixImageSizes($html); this._applySearchHighlight($html); - _decorators.forEach(cb => cb($html, this.getModel)); + _decorators.forEach(cb => cb($html, this.decoratorHelper)); return $html[0]; } diff --git a/plugins/poll/assets/javascripts/initializers/extend-for-poll.js.es6 b/plugins/poll/assets/javascripts/initializers/extend-for-poll.js.es6 index 3141d15397f..9631c3ad99d 100644 --- a/plugins/poll/assets/javascripts/initializers/extend-for-poll.js.es6 +++ b/plugins/poll/assets/javascripts/initializers/extend-for-poll.js.es6 @@ -1,8 +1,8 @@ import { withPluginApi } from 'discourse/lib/plugin-api'; import { observes } from "ember-addons/ember-computed-decorators"; -function createPollComponent(container, post, poll, vote) { - const component = container.lookup("component:discourse-poll"); +function createPollComponent(register, post, poll, vote) { + const component = register.lookup("component:discourse-poll"); component.setProperties({ model: poll, vote, post }); return component; } @@ -82,7 +82,7 @@ function initializePolls(api) { const pollId = `${pollName}-${post.id}`; const pollComponent = createPollComponent( - helper.container, + helper.register, post, polls[pollName], votes[pollName]