From be93e57853bf7d51fa60ba2a1e53445bdf45c0f7 Mon Sep 17 00:00:00 2001 From: josh Date: Mon, 27 Apr 2026 20:50:34 -0400 Subject: [PATCH] Fix empty VITE_API_URL falling back to localhost in production Use ?? instead of || so empty string (same-origin) is preserved while undefined still falls back to localhost:3001 for dev. Co-Authored-By: Claude Opus 4.6 --- apps/web/src/lib/api.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/web/src/lib/api.ts b/apps/web/src/lib/api.ts index 9bae4fa..2e9f7a2 100644 --- a/apps/web/src/lib/api.ts +++ b/apps/web/src/lib/api.ts @@ -1,4 +1,4 @@ -const API_BASE = import.meta.env.VITE_API_URL || 'http://localhost:3001'; +const API_BASE = import.meta.env.VITE_API_URL ?? 'http://localhost:3001'; let authToken: string | null = localStorage.getItem('ai-tycoon-auth-token'); -- 2.39.5