From bad78bfdfbf8aa3ed15ccb6b3d4c4fb8290d857e Mon Sep 17 00:00:00 2001 From: David Taylor Date: Mon, 29 Aug 2022 11:17:32 +0100 Subject: [PATCH] FIX: Preload topic_list correctly for categories+latest (#18122) The preload key was changed in e7a84948b9 but this location was missed. This caused an extra AJAX request and left the cached topic list in the PreloadStore, which would then be accidentally used when navigating to the next topic-list route. --- .../javascripts/discourse/app/routes/discovery-categories.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/assets/javascripts/discourse/app/routes/discovery-categories.js b/app/assets/javascripts/discourse/app/routes/discovery-categories.js index 4ad4307f87a..fdd08792858 100644 --- a/app/assets/javascripts/discourse/app/routes/discovery-categories.js +++ b/app/assets/javascripts/discourse/app/routes/discovery-categories.js @@ -77,7 +77,7 @@ const DiscoveryCategoriesRoute = DiscourseRoute.extend(OpenComposer, { _findCategoriesAndTopics(filter) { return hash({ wrappedCategoriesList: PreloadStore.getAndRemove("categories_list"), - topicsList: PreloadStore.getAndRemove(`topic_list_${filter}`), + topicsList: PreloadStore.getAndRemove("topic_list"), }).then((response) => { let { wrappedCategoriesList, topicsList } = response; let categoriesList =