I encountered a problem when using BroadcastChannel in production env
seems one of users' browser doesn't support it, so it breaks the code, although I checked it beforehand it doesn't work, and it will pass the condition?
const setBroadcastChannel = () => {
if (! "BroadcastChannel" in window ) return;
const bc = new BroadcastChannel(...);
...
}
Apparently, There is another way to install this package but curious if there is a better way to not install a 3rd party package since these users are very few.
Any idea will be appreciated.