vmui: fix query params saving in URL (#3104)

This commit is contained in:
Yury Molodov 2022-09-13 17:05:26 +02:00 committed by GitHub
parent 3af24a5b7c
commit 1304824201
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -24,7 +24,7 @@ export const StateProvider: FC = ({children}) => {
const [state, dispatch] = useReducer(reducer, initialPrepopulatedState);
useEffect(() => {
if (pathname !== router.dashboards || pathname !== router.home) return;
if (pathname !== router.dashboards && pathname !== router.home) return;
setQueryStringValue(state as unknown as Record<string, unknown>);
}, [state, pathname]);