From 20b268aa1bf8cee690693da55899c407575632c7 Mon Sep 17 00:00:00 2001 From: kwaroran Date: Mon, 8 Apr 2024 23:48:54 +0900 Subject: [PATCH] Update BroadcastChannel name in globalApi.ts --- src/ts/storage/globalApi.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/ts/storage/globalApi.ts b/src/ts/storage/globalApi.ts index 01b72fc1..28c9793d 100644 --- a/src/ts/storage/globalApi.ts +++ b/src/ts/storage/globalApi.ts @@ -261,7 +261,10 @@ export async function saveDb(){ }) let gotChannel = false const sessionID = v4() - const channel = BroadcastChannel ? (new BroadcastChannel('risu-active')): null + let channel:BroadcastChannel + if(BroadcastChannel){ + channel = new BroadcastChannel('risu-db') + } if(channel){ channel.onmessage = async (ev) => { if(ev.data === sessionID){