null check for vuex localstorage

This commit is contained in:
Roman Cervantes 2019-06-22 05:41:05 -07:00
parent 03dc56a38c
commit b386d7ea80

View file

@ -49,7 +49,9 @@ router.beforeEach((to, from, next) => {
}
});
const locale = JSON.parse(localStorage.vuex).settings.language || 'en';
const locale = localStorage && localStorage.vuex
? JSON.parse(localStorage.vuex).settings.language
: 'en';
const i18n = new VueI18n({ locale, messages });