1

I am using bugfender in my vue js application, which works fine in Chrome but doesn't work in my Safari Mac.

Safari Version 15.3 (17612.4.9.1.5) @bugfender/sdk: 2.2.2

Error in browser console: ReferenceError: Can't find variable: BroadcastChannel

I did backtrack this issue and it's from bugfender/sdk/lib/index.js

Has anyone face the similar issue?

Prachit Patil
  • 413
  • 5
  • 9

3 Answers3

3

BroadcastChannel only supports safari from 15.4 and up. Reference: https://developer.mozilla.org/en-US/docs/Web/API/BroadcastChannel

if you want use in safari 15.3 down. Use:

import { BroadcastChannel } from 'broadcast-channel'

Object.assign(window, { BroadcastChannel })

you must run this script before all

Tachibana Shin
  • 2,605
  • 1
  • 5
  • 9
1

Upgrade @bugfender/sdk to 2.2.3 and this will work in older safari version.

Prachit Patil
  • 413
  • 5
  • 9
0

@Tachibana Shin,

don't add broadcast-channel to window, look at the screen don't add broadcast-channel to window

just add the polyfill https://github.com/JSmith01/broadcastchannel-polyfill/blob/master/index.js

lazy-load like this enter image description here