From 4063cab8c2d1826078b7d38b8747bc003e9a9897 Mon Sep 17 00:00:00 2001 From: Robin Ward Date: Wed, 19 Aug 2020 12:20:34 -0400 Subject: [PATCH] REFACTOR: Missed `container`s in `DiscourseURL` --- app/assets/javascripts/discourse/app/lib/url.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/app/assets/javascripts/discourse/app/lib/url.js b/app/assets/javascripts/discourse/app/lib/url.js index 916a3826d9a..a6279b55e9e 100644 --- a/app/assets/javascripts/discourse/app/lib/url.js +++ b/app/assets/javascripts/discourse/app/lib/url.js @@ -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"); @@ -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); }, /**