From 50acfc48b989f31eccfe747131809c923fbf04b8 Mon Sep 17 00:00:00 2001 From: Echo Date: Mon, 8 Sep 2025 14:35:59 +0200 Subject: [PATCH] [Glitch] Remove old search results with new search Port 24fb862a65da2545c439ae33625b5a049343dc80 to glitch-soc Signed-off-by: Claire --- app/javascript/flavours/glitch/reducers/search.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/javascript/flavours/glitch/reducers/search.ts b/app/javascript/flavours/glitch/reducers/search.ts index d8a075d742..4369fa4bc2 100644 --- a/app/javascript/flavours/glitch/reducers/search.ts +++ b/app/javascript/flavours/glitch/reducers/search.ts @@ -65,6 +65,9 @@ export const searchReducer = createReducer(initialState, (builder) => { (state, action) => { state.type = action.meta.arg.type; state.loading = true; + if (action.type === submitSearch.pending.type) { + state.results = undefined; + } }, );