You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using the name of any Object.prototype member as an app name causes issues when trying to initialize or retrieve an app.
Steps to reproduce:
// Here we get an error saying there already is a "valueOf" apptry{firebase.initializeApp(options,'valueOf');}catch(err){console.error(err.code+' - '+err.message);}// This simply returns the Object.prototype.toString methodconstapp=firebase.app('toString');console.log(app);
Allow any app name, like it's supposed to work now, and modify any relevant code to support this.
Disallow using the name of any Object.prototype member as an app name by introducing any relevant checks. firebase.initializeApp() would throw an app/bad-app-name error and firebase.app() would throw an app/no-app error.
Personally, I strongly prefer the first option. There's no reason why toString shouldn't be an allowed app name.
[REQUIRED] Describe your environment
[REQUIRED] Describe the problem
Using the name of any
Object.prototype
member as an app name causes issues when trying to initialize or retrieve an app.Steps to reproduce:
Relevant Code:
JSBin reproducing these issues: http://jsbin.com/cohijesema/edit?js,console
The text was updated successfully, but these errors were encountered: