site: fix language switch in Firefox, close: #4360

This commit is contained in:
Benjy Cui 2017-01-03 18:03:02 +08:00
parent 15b81d7ec8
commit 4db6d3b915

View File

@ -42,7 +42,7 @@ export default class Header extends React.Component {
handleLangChange = () => {
const pathname = this.props.location.pathname;
location.pathname = utils.getLocalizedPathname(pathname, !utils.isZhCN(pathname));
location.href = location.href.replace(location.pathname, utils.getLocalizedPathname(pathname, !utils.isZhCN(pathname)));
}
render() {