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.
This commit is contained in:
David Taylor 2022-08-29 11:17:32 +01:00 committed by GitHub
parent 33ea8b4756
commit bad78bfdfb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -77,7 +77,7 @@ const DiscoveryCategoriesRoute = DiscourseRoute.extend(OpenComposer, {
_findCategoriesAndTopics(filter) { _findCategoriesAndTopics(filter) {
return hash({ return hash({
wrappedCategoriesList: PreloadStore.getAndRemove("categories_list"), wrappedCategoriesList: PreloadStore.getAndRemove("categories_list"),
topicsList: PreloadStore.getAndRemove(`topic_list_${filter}`), topicsList: PreloadStore.getAndRemove("topic_list"),
}).then((response) => { }).then((response) => {
let { wrappedCategoriesList, topicsList } = response; let { wrappedCategoriesList, topicsList } = response;
let categoriesList = let categoriesList =