## 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). |
||
|---|---|---|
| .. | ||
| Accounts | ||
| auth | ||
| budgets | ||
| cashflow | ||
| onboarding | ||
| open-banking | ||
| settings | ||
| subscription | ||
| transactions | ||
| waitlist | ||
| dashboard.tsx | ||
| privacy.tsx | ||
| terms.tsx | ||
| welcome.tsx | ||