Skip to content

Fall back to previous receiver scope when nested route has no variabl… - #5

Merged
noha merged 1 commit into
mainfrom
fix-nested-resource-list-receiver
Jul 23, 2026
Merged

noha merged 1 commit into
mainfrom
fix-nested-resource-list-receiver

Conversation

@noha

@noha noha commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

…e segment

matchExtraPath starts the nested route matcher at the previous receiver's scope object. If the extra path ends on a plain named segment (e.g. a list-style endpoint with no trailing id), no HOPVariableSegment is ever traversed, so lastVariableSegment/receiverNode stays nil and receiver resolution crashed. Fall back to the previous resource route's receiver scope in that case, since that is exactly what was used to start the match.

…e segment

matchExtraPath starts the nested route matcher at the previous receiver's
scope object. If the extra path ends on a plain named segment (e.g. a
list-style endpoint with no trailing id), no HOPVariableSegment is ever
traversed, so lastVariableSegment/receiverNode stays nil and receiver
resolution crashed. Fall back to the previous resource route's receiver
scope in that case, since that is exactly what was used to start the match.
@noha
noha merged commit 4ea7341 into main Jul 23, 2026
4 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.

1 participant