fix(tracker): unique broadcast channel name

This commit is contained in:
nick-delirium 2023-11-23 11:13:23 +01:00
parent 9c8e915387
commit 9d0058c66b

View file

@ -180,7 +180,8 @@ export default class App {
)
if (!this.options.forceSingleTab && globalThis && 'BroadcastChannel' in globalThis) {
this.bc = inIframe() ? null : new BroadcastChannel('rick')
const host = location.hostname.split('.').slice(-2).join('_')
this.bc = inIframe() ? null : new BroadcastChannel(`rick_${host}`)
}
this.revID = this.options.revID