diff --git a/src/layer/index.js b/src/layer/index.js index 7cf0490..13ce4d4 100644 --- a/src/layer/index.js +++ b/src/layer/index.js @@ -36,7 +36,7 @@ const LANGUAGES = { } } LANGUAGES['zh-CN'] = LANGUAGES.zh -const lang = LANGUAGES[Anot.language || navigator.language || 'en'] +const lang = LANGUAGES[Anot.language || navigator.language] || LANGUAGES.en let layerDom = {} let layerObj = {} let unique = null // 储存当前打开的1/2/3类型的弹窗 diff --git a/src/meditor/addon/attach-native.js b/src/meditor/addon/attach-native.js index d941901..7a44c22 100644 --- a/src/meditor/addon/attach-native.js +++ b/src/meditor/addon/attach-native.js @@ -81,7 +81,7 @@ const LANGUAGES = { } LANGUAGES['zh-CN'] = LANGUAGES.zh LANGUAGES['zh-TW'] = LANGUAGES.zh -const lang = LANGUAGES[Anot.language || navigator.language || 'en'] +const lang = LANGUAGES[Anot.language || navigator.language] || LANGUAGES.en const fixCont = function(vm, tool) { let limit = false diff --git a/src/meditor/addon/attach.js b/src/meditor/addon/attach.js index 48af897..0bf1746 100644 --- a/src/meditor/addon/attach.js +++ b/src/meditor/addon/attach.js @@ -79,7 +79,7 @@ const LANGUAGES = { } LANGUAGES['zh-CN'] = LANGUAGES.zh LANGUAGES['zh-TW'] = LANGUAGES.zh -const lang = LANGUAGES[Anot.language || navigator.language || 'en'] +const lang = LANGUAGES[Anot.language || navigator.language] || LANGUAGES.en class Uploader { constructor(url) { diff --git a/src/meditor/index.js b/src/meditor/index.js index 269645e..097239f 100644 --- a/src/meditor/index.js +++ b/src/meditor/index.js @@ -140,7 +140,7 @@ const LANGUAGES = { } LANGUAGES['zh-CN'] = LANGUAGES.zh LANGUAGES['zh-TW'] = LANGUAGES.zh -const lang = LANGUAGES[Anot.language || navigator.language || 'en'] +const lang = LANGUAGES[Anot.language || navigator.language] || LANGUAGES.en marked.setOptions({ highlight: function(code, lang) {