Skip to content

Commit

Permalink
fix: test
Browse files Browse the repository at this point in the history
  • Loading branch information
IsaccoSordo committed Oct 8, 2024
1 parent 04f01e2 commit 7d86a6c
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions packages/beacon-core/src/utils/multi-tab-channel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down Expand Up @@ -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.')
}
Expand Down

0 comments on commit 7d86a6c

Please sign in to comment.