null
This commit is contained in:
parent
56386b74d0
commit
cb3aa3927c
|
@ -1,7 +1,7 @@
|
|||
// SafariがBroadcastChannel未実装なのでライブラリを使う
|
||||
import { BroadcastChannel } from 'broadcast-channel';
|
||||
|
||||
export const reloadChannel = new BroadcastChannel<string>('reload');
|
||||
export const reloadChannel = new BroadcastChannel<string | null>('reload');
|
||||
|
||||
// BroadcastChannelを用いて、クライアントが一斉にreloadするようにします。
|
||||
export function unisonReload(path?: string) {
|
||||
|
@ -9,7 +9,7 @@ export function unisonReload(path?: string) {
|
|||
reloadChannel.postMessage(path);
|
||||
location.href = path;
|
||||
} else {
|
||||
reloadChannel.postMessage('reload');
|
||||
reloadChannel.postMessage(null);
|
||||
location.reload();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue