Skip to content

Commit

Permalink
fix route identification priority (wildcards)
Browse files Browse the repository at this point in the history
  • Loading branch information
Tiagoperes committed Sep 9, 2024
1 parent e8e3bb0 commit 0451ced
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/runtime/src/CitronNavigator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ export class CitronNavigator {
: route
case 'subroute':
return this.childrenOf(route).reduce<Route | undefined>(
(result, child) => result ?? this.findRouteByPath(child, path),
(result, child) => result ?? this.findRouteByPath(child, path, lastMatch),
undefined,
) ?? (route.$path.endsWith('*') ? route : lastMatch)
}
Expand Down

0 comments on commit 0451ced

Please sign in to comment.