Commit 4f835aa9 authored by 杨奕's avatar 杨奕 Committed by FuryBean

Homepage: fix a navigator.language bug (#1040)

parent c08c6f17
...@@ -91,7 +91,7 @@ route.push({ ...@@ -91,7 +91,7 @@ route.push({
component: require('./play/index.vue') component: require('./play/index.vue')
}); });
let userLanguage = localStorage.getItem('ELEMENT_LANGUAGE') || window.navigator.language; let userLanguage = localStorage.getItem('ELEMENT_LANGUAGE') || window.navigator.language || 'en-US';
let defaultPath = '/en-US'; let defaultPath = '/en-US';
if (userLanguage.indexOf('zh-') !== -1) { if (userLanguage.indexOf('zh-') !== -1) {
defaultPath = '/zh-CN'; defaultPath = '/zh-CN';
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment