Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make localizeMod SSR safe #126

Merged
merged 10 commits into from
May 6, 2024
Merged

Make localizeMod SSR safe #126

merged 10 commits into from
May 6, 2024

Conversation

Cbodfield
Copy link
Contributor

@Cbodfield Cbodfield commented May 6, 2024

When normalizing the hotkeys in an SSR environment, localizeMod breaks SSR with its direct window.navigator reference.

This PR adds window checks to ensure safe SSR usage, updates types, and adds test coverage.

@Cbodfield Cbodfield marked this pull request as ready for review May 6, 2024 19:34
@Cbodfield Cbodfield requested a review from a team as a code owner May 6, 2024 19:34
Copy link
Contributor

@dgreif dgreif left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for getting this fixed up!

@dgreif dgreif merged commit 63d60c5 into main May 6, 2024
2 checks passed
@dgreif dgreif deleted the cbodfield/localized-mod-ssr branch May 6, 2024 19:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants