Skip to content

Commit

Permalink
REFACTOR: Missed containers in DiscourseURL
Browse files Browse the repository at this point in the history
  • Loading branch information
eviltrout committed Aug 25, 2020
1 parent 02e8d84 commit 4063cab
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions app/assets/javascripts/discourse/app/lib/url.js
Original file line number Diff line number Diff line change
Expand Up @@ -364,8 +364,7 @@ const DiscourseURL = EmberObject.extend({
if (oldTopicId === newTopicId) {
this.replaceState(path);

const container = Discourse.__container__;
const topicController = container.lookup("controller:topic");
const topicController = this.container.lookup("controller:topic");
const opts = {};
const postStream = topicController.get("model.postStream");

Expand Down Expand Up @@ -438,15 +437,15 @@ const DiscourseURL = EmberObject.extend({
},

get router() {
return Discourse.__container__.lookup("router:main");
return this.container.lookup("router:main");
},

get appEvents() {
return Discourse.__container__.lookup("service:app-events");
return this.container.lookup("service:app-events");
},

controllerFor(name) {
return Discourse.__container__.lookup("controller:" + name);
return this.container.lookup("controller:" + name);
},

/**
Expand Down

0 comments on commit 4063cab

Please sign in to comment.