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

Commit 2ea4cf1

Browse files
Adding authListener to the list of listeners if passed in 'init' #987
1 parent a23a182 commit 2ea4cf1

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/firebase-common.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,10 @@ export const firebase: any = {
103103
try {
104104
if (listener.thisArg) {
105105
listener.onAuthStateChanged.call(listener.thisArg, data);
106-
} else {
106+
} else if (listener.onAuthStateChanged) {
107107
listener.onAuthStateChanged(data);
108+
} else {
109+
listener(data);
108110
}
109111
} catch (ex) {
110112
console.error("Firebase AuthStateListener failed to trigger", listener, ex);

0 commit comments

Comments
 (0)