Allow returning empty strings
This commit is contained in:
parent
7863774dca
commit
6f24780874
@ -5,14 +5,13 @@ declare global {
|
||||
}
|
||||
|
||||
const getEnv = (key: string): string | undefined => {
|
||||
if (global.window?.env) {
|
||||
return global.window.env[key];
|
||||
}
|
||||
if (global.process?.env) {
|
||||
return global.process.env[key];
|
||||
}
|
||||
const value = global.window.env[key];
|
||||
if (value === "") {
|
||||
return;
|
||||
}
|
||||
return value;
|
||||
return;
|
||||
};
|
||||
|
||||
const DEBUG_MODE: boolean = getEnv("DEBUG_MODE") == "true";
|
||||
|
Loading…
Reference in New Issue
Block a user