From e2862ed097a7de54a1a617f55dffee52a00010fc Mon Sep 17 00:00:00 2001 From: tamaina Date: Fri, 5 Nov 2021 00:09:13 +0900 Subject: enhane: 完全ログアウト時にすべてのタブがウェルカムページへ移動するように (#7928) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * enhane: unison-reloadに指定したパスに移動できるように * null * null * null * add comments --- src/client/init.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/client/init.ts') diff --git a/src/client/init.ts b/src/client/init.ts index 654e176398..81d17f0d27 100644 --- a/src/client/init.ts +++ b/src/client/init.ts @@ -93,7 +93,10 @@ if (defaultStore.state.reportError && !_DEV_) { document.addEventListener('touchend', () => {}, { passive: true }); // 一斉リロード -reloadChannel.addEventListener('message', () => location.reload()); +reloadChannel.addEventListener('message', path => { + if (path !== null) location.href = path; + else location.reload(); +}); //#region SEE: https://css-tricks.com/the-trick-to-viewport-units-on-mobile/ // TODO: いつの日にか消したい -- cgit v1.2.3-freya