Browse Source

site: 📝 fix version switch locale bug

pull/25889/head
afc163 4 years ago
parent
commit
22d8355ccb
  1. 4
      site/theme/template/Layout/Header/index.tsx

4
site/theme/template/Layout/Header/index.tsx

@ -153,9 +153,7 @@ class Header extends React.Component<HeaderProps, HeaderState> {
.replace(/\/$/, ''); .replace(/\/$/, '');
return; return;
} }
window.location.href = currentUrl window.location.href = currentUrl.replace(window.location.origin, url);
.replace(window.location.origin, url)
.replace(currentPathname, utils.getLocalizedPathname(currentPathname));
}; };
onLangChange = () => { onLangChange = () => {

Loading…
Cancel
Save