fix: route confusion entering from non-home page (#430)

This commit is contained in:
Yunliang Zhou 2022-11-10 19:50:12 +08:00 committed by GitHub
parent e53f5fdd29
commit a313a9bb31
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3,6 +3,7 @@ import store from "../store";
import { setQuery, setPathname, Query, updateStateWithLocation } from "../store/modules/location";
const updateLocationUrl = (method: "replace" | "push" = "replace") => {
store.dispatch(updateStateWithLocation());
const { query, pathname, hash } = store.getState().location;
let queryString = stringify(query);
if (queryString) {