fix(client): Fix #6540
This commit is contained in:
parent
b6c3399abe
commit
9d3beb3174
|
@ -103,9 +103,13 @@ document.body.innerHTML = '<div id="app"></div>';
|
|||
|
||||
const store = createStore();
|
||||
|
||||
// 他のタブと永続化されたstateを同期
|
||||
window.addEventListener('storage', e => {
|
||||
if (e.key === 'vuex') {
|
||||
store.replaceState(JSON.parse(localStorage['vuex']));
|
||||
store.replaceState({
|
||||
...store.state,
|
||||
...JSON.parse(e.newValue)
|
||||
});
|
||||
} else if (e.key === 'i') {
|
||||
location.reload();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue