This commit is contained in:
afc163 2017-02-26 15:20:12 +08:00
parent d44a0ece3f
commit 0f6d1db614

View File

@ -84,9 +84,9 @@ export default class Header extends React.Component {
handleLangChange = () => {
const pathname = this.props.location.pathname;
const currentProtocol = location.protocol + '//';
const currentProtocol = `${location.protocol}//`;
const currentHref = location.href.substr(currentProtocol.length);
if (utils.isLocalStorageNameSupported()) {
localStorage.setItem('locale', utils.isZhCN(pathname) ? 'en-US' : 'zh-CN');
}