diff --git a/CHANGELOG.md b/CHANGELOG.md index 2d6230214..2c8c9b14f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,2 +1,3 @@ - Parallelizes network calls that occur when validating authorization for onCall handlers. - Adds new regions to V2 API +- Fixes bug where the emulator crashed when given app without an `options` property. diff --git a/src/providers/database.ts b/src/providers/database.ts index 76252d515..53eb9ba12 100644 --- a/src/providers/database.ts +++ b/src/providers/database.ts @@ -369,7 +369,7 @@ export class DataSnapshot { private app?: firebase.app.App, instance?: string ) { - if (app && app.options.databaseURL.startsWith('http:')) { + if (app?.options?.databaseURL?.startsWith('http:')) { // In this case we're dealing with an emulator this.instance = app.options.databaseURL; } else if (instance) {