mirror of
https://github.com/discourse/discourse.git
synced 2024-11-27 07:53:43 +08:00
FIX: Clciking the home logo wasn't refreshing categories views
This commit is contained in:
parent
276d139624
commit
80edb4cebc
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue
Block a user