Update BroadcastChannel name in globalApi.ts

This commit is contained in:
kwaroran
2024-04-08 23:48:54 +09:00
parent 653fb6fa9f
commit 20b268aa1b

View File

@@ -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){