sveltefire icon indicating copy to clipboard operation
sveltefire copied to clipboard

Firebase analytics are initialized even when they're unsupported

Open ranile opened this issue 5 years ago • 0 comments

Firebase analytics are initialized when they're unsupported resulting in the following error:

Uncaught (in promise) FirebaseError: Analytics: Environment doesn't support IndexedDB: A mutation operation was attempted on a database that did not allow mutations.. Wrap initialization of analytics in analytics.isSupported() to prevent initialization in unsupported environments (analytics/invalid-indexedDB-context).

It is recommended that remote config should not be initialized when it unsupported (https://github.com/firebase/firebase-js-sdk/issues/2373#issuecomment-557293448). The library should handle that.

ranile avatar Aug 01 '20 18:08 ranile