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(router): exclude route groups in scoring for sorting #2792

Merged
merged 1 commit into from
Dec 16, 2024

Conversation

marvinhagemeister
Copy link
Collaborator

@marvinhagemeister marvinhagemeister commented Dec 16, 2024

This PR fixes an issue in the route sorting logic when comparing a route segment with a group vs a segment without one.

  • /(app)/[org]/[app]/index.ts
  • /auth/login.ts

When determing the order of these two routes we need to skip over the (app) group to the next non-group segment. This ensures that we are only scoring actual segments with each other and non-existing ones.

Copy link
Member

@lucacasonato lucacasonato left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks

@marvinhagemeister marvinhagemeister merged commit 70d6cbd into main Dec 16, 2024
9 checks passed
@marvinhagemeister marvinhagemeister deleted the route-sort-test branch December 16, 2024 13:14
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