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; }