fix(web): remove early-return guard from devFetch interceptor (GRO-406)

The if (!getDevUser()) return at install time prevented the interceptor
from installing on app startup before any dev user was selected. Since
the per-call check already handles the no-dev-user case correctly,
the early-return guard is unnecessary and breaks the interceptor install
in deployed dev builds.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
groombook-engineer[bot]
2026-04-02 18:02:02 +00:00
parent 3216fd2ee5
commit 321bd90249
-4
View File
@@ -9,10 +9,6 @@ const originalFetch = window.fetch;
* Intentionally mutates window.fetch — this is dev-only (AUTH_DISABLED=true).
*/
export function installDevFetchInterceptor() {
// Only install if a dev user is selected (localStorage check, not build-time flag).
// This ensures the interceptor runs in deployed dev builds, not just `vite dev`.
if (!getDevUser()) return;
window.fetch = function (input: RequestInfo | URL, init?: RequestInit) {
const user = getDevUser();
if (!user) return originalFetch(input, init);