fix api url setup

This commit is contained in:
Adrien
2026-04-10 13:55:05 +02:00
parent 0711e40c66
commit 820734c251
+3 -1
View File
@@ -4,5 +4,7 @@
* At build time (dev / CI), values come from import.meta.env.
*/
export function env(key: string): string | undefined {
return (window as Record<string, any>).__env__?.[key] ?? (import.meta.env as Record<string, any>)[key]
const runtime = (window as Record<string, any>).__env__?.[key]
if (runtime) return runtime
return (import.meta as any).env?.[key]
}