diff --git a/front/src/Enum/EnvironmentVariable.ts b/front/src/Enum/EnvironmentVariable.ts index 83a820b3..e9b3bfc4 100644 --- a/front/src/Enum/EnvironmentVariable.ts +++ b/front/src/Enum/EnvironmentVariable.ts @@ -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";