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(router): decode path for storing elements and slug as prop #1304

Merged
merged 2 commits into from
Mar 10, 2025

Conversation

tylersayshi
Copy link
Contributor

Let me know if this approach is ok. The change makes it so that id's internally for routes are always decoded. This makes it so the prop is decoded when it is passed. It also fixes the runtime error. The runtime error happened when the id as being looked up in elements as decoded, but internally stored as encoded, so our invalid element id error was thrown.

fixes #1302

Let me know if this approach is ok. The change makes it so that id's
internally for routes are always decoded. This makes it so the prop
is decoded when it is passed. It also fixes the runtime error. The runtime
error happened when the id as being looked up in elements as decoded, but
internally stored as encoded, so our invalid element id error was thrown.

fixes dai-shi#1302
Copy link

vercel bot commented Mar 10, 2025

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

1 Skipped Deployment
Name Status Preview Updated (UTC)
waku ⬜️ Ignored (Inspect) Visit Preview Mar 10, 2025 5:15am

Copy link

codesandbox-ci bot commented Mar 10, 2025

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

@dai-shi
Copy link
Owner

dai-shi commented Mar 10, 2025

I might overlook something, but it looks good to me. Would it be possible to add an e2e test case?

@tylersayshi
Copy link
Contributor Author

added!

@dai-shi dai-shi merged commit 839e114 into dai-shi:main Mar 10, 2025
26 checks passed
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.

Single quotes in route params will cause the page crash
2 participants