Skip to content

Commit 7009181

Browse files
authored
fix: Add type check for process.env (#5790)
1 parent 7a4e65c commit 7009181

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/database/src/api/Database.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ export function repoManagerDatabaseFromApp(
128128
let isEmulator: boolean;
129129

130130
let dbEmulatorHost: string | undefined = undefined;
131-
if (typeof process !== 'undefined') {
131+
if (typeof process !== 'undefined' && process.env) {
132132
dbEmulatorHost = process.env[FIREBASE_DATABASE_EMULATOR_HOST_VAR];
133133
}
134134

0 commit comments

Comments
 (0)