Skip to content

Commit

Permalink
fix(module): Conditionally pass app name
Browse files Browse the repository at this point in the history
  • Loading branch information
davideast committed Dec 30, 2016
1 parent 090568e commit 8427009
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/angularfire2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,11 @@ export class AngularFire {

export function _getFirebase(config: FirebaseAppConfig, appName?: string): firebase.app.App {
try {
return firebase.initializeApp(config, appName);
if (appName) {
return firebase.initializeApp(config, appName);
} else {
return firebase.initializeApp(config);
}
}
catch (e) {
return firebase.app(null);
Expand Down

0 comments on commit 8427009

Please # to comment.