whisper-money/resources/js
Víctor Falcón b1709b714e
fix(onboarding): guard window access in SSR (#351)
## Problem

Production SSR crashes repeatedly when rendering the Onboarding page:

```
ReferenceError: window is not defined
  at Onboarding (/app/bootstrap/ssr/assets/index-BEtdcHXd.js:2295)
```

The `useMemo` reading `?step=` from the URL accessed
`window.location.search` directly, which fails during Inertia SSR.

Observed ~7+ times in production logs between 18:35–21:37 UTC.

## Fix

Add `typeof window === 'undefined'` guard before reading the URL.
Returns `undefined` on the server so the step initializer falls back to
default behavior; client hydration re-runs and reads the URL.

## Related logs

- `Inertia\Ssr\SsrException` — Onboarding page
- Other SSR-touching files (`welcome.tsx`, `auth/login.tsx`) verified
safe (window inside `useEffect` or already guarded).
2026-05-05 08:45:44 +01:00
..
components feat(accounts): show projection on real estate chart (#338) 2026-04-27 08:08:12 +01:00
contexts Move transaction filtering from client-side to server-side (#126) 2026-02-16 12:49:04 +01:00
hooks feat(settings): centralize currency options and split profile/account support (#256) 2026-04-02 19:23:10 +02:00
layouts feat(open-banking): remove feature flag gating (#297) 2026-04-17 10:20:05 +02:00
lib fix(i18n): translate Unknown Income/Expense and other missing ES strings (#331) 2026-04-24 17:58:26 +01:00
pages fix(onboarding): guard window access in SSR (#351) 2026-05-05 08:45:44 +01:00
providers chore: Change mobile menu translation on spanish (#268) 2026-04-10 13:46:26 +01:00
services feat: Decrypt encrypted transactions on key unlock (#123) 2026-02-16 10:37:43 +01:00
types refactor(real-estate): remove Pennant gating (#308) 2026-04-20 13:31:49 +01:00
utils fix: preserve cents in chart amounts (#270) 2026-04-10 15:41:24 +02:00
app.tsx fix(user): persist detected timezones (#296) 2026-04-16 11:36:57 +01:00
ssr.tsx Remove plaintext-transactions feature flag & E2E references (#116) 2026-02-13 11:10:21 +01:00