Skip to content

fix: Fix navigate bug from nested index routes - #8965

Merged
ryanflorence merged 1 commit into
devfrom
brophdawg11/navigate-fix
Jun 10, 2022
Merged

ryanflorence merged 1 commit into
devfrom
brophdawg11/navigate-fix

Conversation

@brophdawg11

Copy link
Copy Markdown
Contributor

Follow up to #8954

match.pathnameBase !== matches[index - 1].pathnameBase)
);

if (matches.length > 0 && matches[matches.length - 1].route.index) {

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This was incorrect and should have been checking pathContributingMatches instead of matches, but instead we can just lump the index check into the filter above

@david-crespo

Copy link
Copy Markdown
Contributor

Thanks! I agree that combining the whole filter into one line is less error-prone.

@ryanflorence
ryanflorence merged commit 5ec32d2 into dev Jun 10, 2022
@ryanflorence
ryanflorence deleted the brophdawg11/navigate-fix branch June 10, 2022 16:00
brophdawg11 pushed a commit that referenced this pull request Mar 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants