fix
This commit is contained in:
parent
852e4db958
commit
4522c752ee
1 changed files with 2 additions and 2 deletions
|
@ -4,12 +4,12 @@ import { BroadcastChannel } from 'broadcast-channel';
|
||||||
export const reloadChannel = new BroadcastChannel<boolean>('reload');
|
export const reloadChannel = new BroadcastChannel<boolean>('reload');
|
||||||
|
|
||||||
// BroadcastChannelを用いて、クライアントが一斉にreloadするようにします。
|
// BroadcastChannelを用いて、クライアントが一斉にreloadするようにします。
|
||||||
export function unisonReload(redirectToRoot?: boolean) {
|
export function unisonReload(redirectToRoot: boolean = false) {
|
||||||
reloadChannel.postMessage(!!redirectToRoot);
|
reloadChannel.postMessage(!!redirectToRoot);
|
||||||
reload();
|
reload();
|
||||||
}
|
}
|
||||||
|
|
||||||
export function reload(redirectToRoot?: boolean) {
|
export function reload(redirectToRoot: boolean = false) {
|
||||||
if (redirectToRoot) {
|
if (redirectToRoot) {
|
||||||
location.href = '/';
|
location.href = '/';
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue