Skip to content

Commit

Permalink
Locale: compatible vue-i18n, fixed #973
Browse files Browse the repository at this point in the history
  • Loading branch information
QingWei-Li committed Nov 16, 2016
1 parent 0013043 commit 2241e9f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/locale/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@ export const t = function(path, options) {
if (typeof vuei18n === 'function') {
if (!merged) {
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]);
}
Expand Down

0 comments on commit 2241e9f

Please sign in to comment.