We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 51465ce commit 084fa1fCopy full SHA for 084fa1f
packages/messaging/src/helpers/register.ts
@@ -40,6 +40,11 @@ import { name, version } from '../../package.json';
40
const WindowMessagingFactory: InstanceFactory<'messaging'> = (
41
container: ComponentContainer
42
) => {
43
+ if (!navigator.serviceWorker) {
44
+ console.warn("Service workers are not supported in this environment.");
45
+ return;
46
+ }
47
+
48
const messaging = new MessagingService(
49
container.getProvider('app').getImmediate(),
50
container.getProvider('installations-internal').getImmediate(),
0 commit comments