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

fix: Check for undefined next property on window #456

Merged
merged 1 commit into from
Jan 15, 2024

Conversation

franky47
Copy link
Member

@franky47 franky47 commented Jan 15, 2024

In test environment where Next.js isn't actually used but the router is mocked, this internal property isn't set, and accessing it causes a "Type error: cannot read properties of undefined (reading 'router')" error.

Closes #454.

Copy link

vercel bot commented Jan 15, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
nuqs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 15, 2024 0:14am

@franky47 franky47 changed the title fix: Check for null next property on window fix: Check for undefined next property on window Jan 15, 2024
@franky47 franky47 merged commit ef75b2c into next Jan 15, 2024
24 checks passed
@franky47 franky47 deleted the fix/454-next-detection branch January 15, 2024 12:18
Copy link

🎉 This PR is included in version 1.15.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Vitest storybook tests erroring since 1.13.2
1 participant