Skip to content

Commit af6bda7

Browse files
committed
#783 frontend: Fixed plot button dead bug
1 parent 45fea00 commit af6bda7

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/frontend/src/utils.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,9 @@ const validateLeagues = (searchParams: URLSearchParams) => {
9797
};
9898

9999
export const validateAndSetSearchParams = (searchParams: URLSearchParams) => {
100+
const graphState = useGraphInputStore.getState();
100101
try {
102+
graphState.setHashFromStore();
101103
validateLeagues(searchParams);
102104
} catch (error) {
103105
const graphState = useGraphInputStore.getState();
@@ -106,5 +108,7 @@ export const validateAndSetSearchParams = (searchParams: URLSearchParams) => {
106108
const searchParams = new URLSearchParams();
107109
searchParams.set("league", DEFAULT_LEAGUES[0]);
108110
graphState.setHashFromStore();
111+
} finally {
112+
graphState.setStateHash(undefined);
109113
}
110114
};

0 commit comments

Comments
 (0)