Skip to content

Commit 3ad944b

Browse files
authored
fix getEnvVar non default val (#157)
1 parent 8469671 commit 3ad944b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

packages/web-server/src/env-var.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ config();
44

55
export function getEnvVar(
66
varName: string,
7-
defaultValue: string,
8-
isHardDependency = false
7+
defaultValue?: string,
8+
isHardDependency?: boolean
99
): string {
1010
const val = process.env[varName];
1111
if (!val) {
@@ -19,5 +19,5 @@ export function getEnvVar(
1919
);
2020
}
2121
}
22-
return val || defaultValue;
22+
return (val !== undefined ? val : defaultValue) || "";
2323
}

0 commit comments

Comments
 (0)