fix #924 404 Not Found after router change

This commit is contained in:
Baorong Li
2018-12-12 06:53:26 +08:00
parent 94c8e2168f
commit 0949a298c9
+2 -3
View File
@@ -246,9 +246,8 @@ export function getLocale() {
export function setLocale(language) {
if (getLocale() !== language) {
umiRouter.push({
pathname: `/${language}${deLangPrefix(window.location.pathname)}${
window.location.search
}`,
pathname: `/${language}${deLangPrefix(window.location.pathname)}`,
search: window.location.search,
})
}
}