From 79b406c0f36241d447459aee82c6ae55d519b744 Mon Sep 17 00:00:00 2001 From: Robin Ward Date: Sat, 15 Feb 2014 18:53:44 -0500 Subject: [PATCH] FIX: If default page is categories, anonymous users were seeing latest categories when going into a category. --- .../discourse/routes/discovery_categories_route.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/assets/javascripts/discourse/routes/discovery_categories_route.js b/app/assets/javascripts/discourse/routes/discovery_categories_route.js index e045c21749d..369156330c8 100644 --- a/app/assets/javascripts/discourse/routes/discovery_categories_route.js +++ b/app/assets/javascripts/discourse/routes/discovery_categories_route.js @@ -17,6 +17,10 @@ Discourse.DiscoveryCategoriesRoute = Discourse.Route.extend({ }, model: function() { + // TODO: Remove this and ensure server side does not supply `topic_list` + // if default page is categories + PreloadStore.remove("topic_list"); + return Discourse.CategoryList.list('categories').then(function(list) { var tracking = Discourse.TopicTrackingState.current(); if (tracking) {