Skip to content

Commit 520930b

Browse files
authored
fix(core): Defensively catch Firebase isSupported calls (#3146)
1 parent f61bc7d commit 520930b

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/core.ts

+6
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,20 @@ const isMessagingSupportedPromiseSymbol = '__angularfire_symbol__messagingIsSupp
1616

1717
globalThis[isAnalyticsSupportedPromiseSymbol] ||= isAnalyticsSupported().then(it =>
1818
globalThis[isAnalyticsSupportedValueSymbol] = it
19+
).catch(() =>
20+
globalThis[isAnalyticsSupportedValueSymbol] = false
1921
);
2022

2123
globalThis[isMessagingSupportedPromiseSymbol] ||= isMessagingSupported().then(it =>
2224
globalThis[isMessagingSupportedValueSymbol] = it
25+
).catch(() =>
26+
globalThis[isMessagingSupportedValueSymbol] = false
2327
);
2428

2529
globalThis[isRemoteConfigSupportedPromiseSymbol] ||= isRemoteConfigSupported().then(it =>
2630
globalThis[isRemoteConfigSupportedValueSymbol] = it
31+
).catch(() =>
32+
globalThis[isRemoteConfigSupportedValueSymbol] = false
2733
);
2834

2935
const isSupportedError = (module: string) =>

0 commit comments

Comments
 (0)