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 Aliaksandr Valialkin
parent 961e986ca9
commit 46e8bd34f7
No known key found for this signature in database
GPG key ID: A72BEC6CD3D0DED1

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]);