fix(client): Fix #6540

This commit is contained in:
syuilo 2020-07-15 18:03:08 +09:00
parent b6c3399abe
commit 9d3beb3174

View file

@ -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();
}