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 ctx.routerPath causes routes to fail path matches issue #102

Closed
wants to merge 3 commits into from
Closed

Fix ctx.routerPath causes routes to fail path matches issue #102

wants to merge 3 commits into from

Conversation

dsmackie
Copy link

This PR fixes the issue discussed at #101.

If a ctx.path contains parameters then do not update ctx.routerPath to equal layer.path. Instead, keep the original ctx.path so future matches can occur.

All tests PASS.

@niftylettuce
Copy link
Contributor

It seems like the tests are failing right now @dsmackie, can you take a double look?

@dsmackie
Copy link
Author

I stuff it up. Closing!

@dsmackie dsmackie closed this Aug 27, 2020
@niftylettuce
Copy link
Contributor

What?

@dsmackie
Copy link
Author

dsmackie commented Aug 27, 2020

@niftylettuce I realised that I did not update the tests so closed this. I also do not think I am approaching this in the right way. Updating ctx.routerPath to reflect the supplied path instead of the matched path now feels like the wrong way to fix this.

I think it would be best to do the check further up when path is first determined.

Can you check out the attached issue and comment if this is even an issue or maybe intended?

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