]> cat aescling's git repositories - mastodon.git/commitdiff
Fix “Filter this post” potentially listing deleted filters (#19051)
authorClaire <claire.github-309c@sitedethib.com>
Thu, 25 Aug 2022 15:36:35 +0000 (17:36 +0200)
committeraescling <aescling+gitlab@cat.family>
Mon, 5 Sep 2022 04:28:01 +0000 (00:28 -0400)
app/javascript/mastodon/reducers/filters.js

index cc1d3349c59a928017d65c4e5253e34e64cf436d..f4f97cd3a8a8cbb2bc8711c7f19349cb90686536 100644 (file)
@@ -35,7 +35,7 @@ export default function filters(state = ImmutableMap(), action) {
   case FILTERS_CREATE_SUCCESS:
     return normalizeFilter(state, action.filter);
   case FILTERS_FETCH_SUCCESS:
-    //TODO: handle deleting obsolete filters
+    return normalizeFilters(ImmutableMap(), action.filters);
   case FILTERS_IMPORT:
     return normalizeFilters(state, action.filters);
   default: