Repository navigation
Fix named route matching when static route with trailing slash is registered - #4889
AdamMagued wants to merge 4 commits into
Conversation
|
Good catch on the trailing-slash-vs-param-route interaction — that bug has been in the tree for a while and the regression tests cover both directions plus the TSR fallback case (3 and 4) which is what would have caught this originally. Substantive concerns, mostly on the diff shape: 1.
I'd add 2. 3. Dead code I want to call out. The diff drops: if path == "/" && n.wildChild && n.nType != root { value.tsr = true; return value }
if path == "/" && n.nType == static { value.tsr = true; return value }and the equivalent at the end. They're now folded into 4. Test coverage. Cases 1, 2, 3, 4 are good. Add one: 5. Minor: |
|
Addressed review feedback:
Full test suite passes with race detection enabled. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #4889 +/- ##
=======================================
Coverage 98.65% 98.65%
=======================================
Files 48 48
Lines 3188 3198 +10
=======================================
+ Hits 3145 3155 +10
Misses 43 43
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Resolves #4844.