From 26ee51e7fc3b27240577ba3e7ef3ad879e82a7d0 Mon Sep 17 00:00:00 2001 From: Brian Ward Date: Thu, 27 Jun 2024 20:14:47 +0000 Subject: [PATCH] Avoid conditional in useEffect --- gui/src/app/SPAnalysis/SPAnalysisContextProvider.tsx | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/gui/src/app/SPAnalysis/SPAnalysisContextProvider.tsx b/gui/src/app/SPAnalysis/SPAnalysisContextProvider.tsx index 62d28843..ddad1ed7 100644 --- a/gui/src/app/SPAnalysis/SPAnalysisContextProvider.tsx +++ b/gui/src/app/SPAnalysis/SPAnalysisContextProvider.tsx @@ -24,7 +24,6 @@ const SPAnalysisContextProvider: FunctionComponent { // as user reloads the page or closes the tab, save state to local storage const handleBeforeUnload = () => { @@ -39,8 +38,6 @@ const SPAnalysisContextProvider: FunctionComponent { - if (searchParams.size === 0 && data !== initialDataModel) return; - const queries = fromQueryParams(searchParams) if (queryStringHasParameters(queries)) { fetchRemoteAnalysis(queries).then((data) => { @@ -58,8 +55,10 @@ const SPAnalysisContextProvider: FunctionComponent