FIX: remove from preload store so it is not cached forever

This commit is contained in:
Sam 2016-08-31 14:07:31 +10:00
parent 55fad7b339
commit 282a4e1efb

View file

@ -40,8 +40,8 @@ const DiscoveryCategoriesRoute = Discourse.Route.extend(OpenComposer, {
},
_loadCategoriesAndLatestTopics() {
const wrappedCategoriesList = PreloadStore.get("categories_list");
const topicListLatest = PreloadStore.get("topic_list_latest");
const wrappedCategoriesList = PreloadStore.getAndRemove("categories_list");
const topicListLatest = PreloadStore.getAndRemove("topic_list_latest");
const categoriesList = wrappedCategoriesList && wrappedCategoriesList.category_list;
if (categoriesList && topicListLatest) {
return new Ember.RSVP.Promise(resolve => {