fix: guard GoogleOneTapContainer against SSR window access - #17567
Conversation
Removing the feature flag dropped the short-circuit that previously kept the window.location.pathname check from running during SSR, causing a "window is not defined" 500. Guard the enabled check with a typeof window test so it resolves to false on the server. Assisted-By: Claude <noreply@anthropic.com>
#9568 Bundle Size — 9.02MiB (~+0.01%).9cd1d17(current) vs 914f877 main#9565(baseline) Warning Bundle contains 29 duplicate packages – View duplicate packages Bundle metrics
Bundle size by type
Bundle analysis report Branch brian/one-tap-cleanup-follow-up Project dashboard Generated by RelativeCI Documentation Report issue |
SummaryAdds a Issues FoundNone. The guard is placed first in the Areas Reviewed
Looks good to merge. |
The type of this PR is: Fix
Description
Removing the feature flag dropped the short-circuit that previously kept the window.location.pathname check from running during SSR, causing a "window is not defined" 500. Guard the enabled check with a typeof window test so it resolves to false on the server.
Assisted-By: Claude noreply@anthropic.com