Skip to content

Commit

Permalink
fix: Add type check for process.env (#5790)
Browse files Browse the repository at this point in the history
  • Loading branch information
nandenjin authored Apr 11, 2022
1 parent 7a4e65c commit 7009181
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/database/src/api/Database.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ export function repoManagerDatabaseFromApp(
let isEmulator: boolean;

let dbEmulatorHost: string | undefined = undefined;
if (typeof process !== 'undefined') {
if (typeof process !== 'undefined' && process.env) {
dbEmulatorHost = process.env[FIREBASE_DATABASE_EMULATOR_HOST_VAR];
}

Expand Down

0 comments on commit 7009181

Please sign in to comment.