FIX: If default page is categories, anonymous users were seeing latest

categories when going into a category.
This commit is contained in:
Robin Ward 2014-02-15 18:53:44 -05:00
parent d298e2e065
commit 79b406c0f3
1 changed files with 4 additions and 0 deletions

View File

@ -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) {