diff --git a/packages/beacon-core/src/utils/multi-tab-channel.ts b/packages/beacon-core/src/utils/multi-tab-channel.ts index f00b6c84b..726947b19 100644 --- a/packages/beacon-core/src/utils/multi-tab-channel.ts +++ b/packages/beacon-core/src/utils/multi-tab-channel.ts @@ -18,9 +18,6 @@ type BCMessage = { } const logger = new Logger('MultiTabChannel') -const isMobile = typeof window !== 'undefined' ? /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test( - navigator.userAgent -) : false export class MultiTabChannel { private id: string = String(Date.now()) @@ -48,6 +45,10 @@ export class MultiTabChannel { } private async init() { + const isMobile = typeof window !== 'undefined' ? /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test( + navigator.userAgent + ) : false + if (isMobile) { throw new Error('BroadcastChannel is not fully supported on mobile.') }