FIX: Use the register within the poll plugin

This commit is contained in:
Robin Ward
2016-11-25 11:57:51 -05:00
parent e3b47a3998
commit d8a69e6bb2
2 changed files with 6 additions and 6 deletions

View File

@@ -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]