From 6a446d5b2f0df54b7f1124e9249d25790e95033c Mon Sep 17 00:00:00 2001 From: mrjvs Date: Tue, 12 Dec 2023 22:53:35 +0100 Subject: [PATCH] fix bug I guess --- src/setup/config.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/setup/config.ts b/src/setup/config.ts index e42d236f..47d18412 100644 --- a/src/setup/config.ts +++ b/src/setup/config.ts @@ -48,7 +48,11 @@ const env: Record = { // loads from different locations, in order: environment (VITE_{KEY}), window (public/config.js) function getKeyValue(key: keyof Config): string | undefined { let windowValue = (window as any)?.__CONFIG__?.[`VITE_${key}`]; - if (windowValue !== undefined && windowValue.length === 0) + if ( + windowValue !== null && + windowValue !== undefined && + windowValue.length === 0 + ) windowValue = undefined; return env[key] ?? windowValue ?? undefined; }