Commit b20995fc authored by SkyAo's avatar SkyAo Committed by GitHub

Merge pull request #1095 from QingWei-Li/fix/default-locale

Locale: compatible vue-i18n, fixed #973
parents d4e45e8d 2241e9f2
...@@ -12,7 +12,10 @@ export const t = function(path, options) { ...@@ -12,7 +12,10 @@ export const t = function(path, options) {
if (typeof vuei18n === 'function') { if (typeof vuei18n === 'function') {
if (!merged) { if (!merged) {
merged = true; merged = true;
Vue.locale(Vue.config.lang, deepmerge(lang, Vue.locale(Vue.config.lang), { clone: true })); Vue.locale(
Vue.config.lang,
deepmerge(lang, Vue.locale(Vue.config.lang) || {}, { clone: true })
);
} }
return vuei18n.apply(this, [path, options]); return vuei18n.apply(this, [path, options]);
} }
......
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