Skip to content

Commit

Permalink
fix: Add type check for process.env
Browse files Browse the repository at this point in the history
  • Loading branch information
nandenjin committed Dec 5, 2021
1 parent 931c80d commit c3c85d8
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 c3c85d8

Please sign in to comment.