Skip to content
This repository was archived by the owner on Apr 4, 2023. It is now read-only.

Commit 5001dce

Browse files
firebase.init error: TypeError: Cannot read property 'getInstance' of undefined #933
1 parent db8a218 commit 5001dce

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/firebase.android.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ import * as appModule from "tns-core-modules/application";
1212
import { AndroidActivityResultEventData } from "tns-core-modules/application";
1313
import { ad as AndroidUtils, layout } from "tns-core-modules/utils/utils";
1414
import lazy from "tns-core-modules/utils/lazy";
15-
import { topmost } from "tns-core-modules/ui/frame";
1615
import { firestore, User } from "./firebase";
1716

1817
declare const android, com, org: any;
@@ -38,7 +37,7 @@ let fbCallbackManager = null;
3837
const GOOGLE_SIGNIN_INTENT_ID = 123;
3938
const REQUEST_INVITE_INTENT_ID = 48;
4039

41-
const authEnabled = lazy(() => typeof (com.google.firebase.auth) !== "undefined");
40+
const authEnabled = lazy(() => typeof (com.google.firebase.auth) !== "undefined" && typeof (com.google.firebase.auth.FirebaseAuth) !== "undefined");
4241
const messagingEnabled = lazy(() => typeof (com.google.firebase.messaging) !== "undefined");
4342
const dynamicLinksEnabled = lazy(() => typeof (com.google.firebase.dynamiclinks) !== "undefined");
4443

0 commit comments

Comments
 (0)