-
Notifications
You must be signed in to change notification settings - Fork 913
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(app): fix issue with FirebaseApp extending INTERNAL (#38)
* fix(app): fix issue with FirebaseApp extending INTERNAL FirebaseAppImpl should not extend prototype.INTERNAL as this will apply to all Firebase app instances. To reproduce, do the following: var app1 = firebase.initializeApp(config); var app2 = firebase.initializeApp(config, 'app2'); console.log(app1.INTERNAL === app2.internal); The above incorrectly resolves to true. This means that if I sign in with app1.auth() and then call app1.INTERNAL.getToken(), it will resolve with null as it is getting app2.INTERNAL.getToken. The last initialized instance will basically overwrite all existing ones. This is currently breaking all FirebaseUI-web single page applications using Firebase real-time database with JS version >= 4.1.0: firebase/firebaseui-web#47 (comment) This should also be breaking any application using Auth and Database with multiple app instances. * fix(app): removed extra spaces and commented code
- Loading branch information
1 parent
8a90518
commit cb46f75
Showing
2 changed files
with
49 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters