mirror of
https://github.com/romancm/gamebrary
synced 2024-11-28 06:00:22 +00:00
null check for vuex localstorage
This commit is contained in:
parent
03dc56a38c
commit
b386d7ea80
1 changed files with 3 additions and 1 deletions
|
@ -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 });
|
||||
|
||||
|
|
Loading…
Reference in a new issue