From 7863774dcacfa5f2546f22b44374348c29916486 Mon Sep 17 00:00:00 2001 From: Lukas Hass Date: Mon, 24 Jan 2022 11:53:01 +0100 Subject: [PATCH] Return value from process.env if it exists --- front/src/Enum/EnvironmentVariable.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/front/src/Enum/EnvironmentVariable.ts b/front/src/Enum/EnvironmentVariable.ts index df8ec7e6..83a820b3 100644 --- a/front/src/Enum/EnvironmentVariable.ts +++ b/front/src/Enum/EnvironmentVariable.ts @@ -5,8 +5,8 @@ declare global { } const getEnv = (key: string): string | undefined => { - if (!global.window || !global.window.env) { - return; + if (global.process?.env) { + return global.process.env[key]; } const value = global.window.env[key]; if (value === "") {