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