FIX: `lookupFactory` doesn't exist on `getOwner` result

This commit is contained in:
Robin Ward 2016-12-01 11:24:30 -05:00
parent e0803e1f91
commit 0dbcb4ec8a
1 changed files with 3 additions and 4 deletions

View File

@ -146,10 +146,9 @@ const ApplicationRoute = Discourse.Route.extend(OpenComposer, {
},
changeBulkTemplate(w) {
const controllerName = w.replace('modal/', ''),
factory = getOwner(this).lookupFactory('controller:' + controllerName);
this.render(w, {into: 'modal/topic-bulk-actions', outlet: 'bulkOutlet', controller: factory ? controllerName : 'topic-bulk-actions'});
const controllerName = w.replace('modal/', '');
const controller = getOwner(this).lookup('controller:' + controllerName);
this.render(w, {into: 'modal/topic-bulk-actions', outlet: 'bulkOutlet', controller: controller ? controllerName : 'topic-bulk-actions'});
},
createNewTopicViaParams(title, body, category_id, category, tags) {