From 80edb4cebcaa082d4ee9f3dacf9ff6c1a69e3df9 Mon Sep 17 00:00:00 2001 From: Robin Ward Date: Fri, 24 Mar 2017 16:30:00 -0400 Subject: [PATCH] FIX: Clciking the home logo wasn't refreshing categories views --- .../javascripts/discourse/routes/discovery-categories.js.es6 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/assets/javascripts/discourse/routes/discovery-categories.js.es6 b/app/assets/javascripts/discourse/routes/discovery-categories.js.es6 index 9f4c76ee7d..d254e0e6a2 100644 --- a/app/assets/javascripts/discourse/routes/discovery-categories.js.es6 +++ b/app/assets/javascripts/discourse/routes/discovery-categories.js.es6 @@ -92,14 +92,15 @@ const DiscoveryCategoriesRoute = Discourse.Route.extend(OpenComposer, { refresh() { const controller = this.controllerFor("discovery/categories"); + const discController = this.controllerFor("discovery"); // Don't refresh if we're still loading - if (!controller || controller.get("loading")) { return; } + if (!discController || discController.get("loading")) { return; } // If we `send('loading')` here, due to returning true it bubbles up to the // router and ember throws an error due to missing `handlerInfos`. // Lesson learned: Don't call `loading` yourself. - controller.set("loading", true); + discController.set("loading", true); this.model().then(model => { this.setupController(controller, model);