Extract variable
This commit is contained in:
parent
c2326060b3
commit
4f72751ed6
@ -16,9 +16,10 @@ const store = createStore({
|
||||
},
|
||||
mutations: {
|
||||
initializeStore(state) {
|
||||
if(localStorage.getItem("store")){
|
||||
let store = localStorage.getItem("store");
|
||||
if(store){
|
||||
this.replaceState(
|
||||
Object.assign(state, JSON.parse(localStorage.getItem("store")))
|
||||
Object.assign(state, store)
|
||||
);
|
||||
}
|
||||
},
|
||||
|
Loading…
x
Reference in New Issue
Block a user