Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
when we unified our param utilities into withParams, we also changed the logic for the combine utilities like
combinePath
,combineQuery
, etc. Those utilities used to just spread the params togetherBut with the half thought of a
toString()
method I updated this to re-callwithParams
Even without the
toString()
property this felt right but caused a bug. BecausewithParams
renames param keys to possibly start with a leading "?" it ends up being lost when we re-callwithParams
when combining. Therefore if you assign a custom param (anything other than String) to a route with a parent, it will just become a string param.For this PR I decided to update the
getParam
utility to check for a param without "?", then check for the param with a leading "?", then use the default "String".Alternatively I'd be happy to go back to the version we had previously where we do not re-call
withParams
.