Skip to content

Commit

Permalink
Fixed parent link active issue remix-run#10506
Browse files Browse the repository at this point in the history
  • Loading branch information
Bilal Kazmi committed Jul 24, 2023
1 parent 4bdd6b4 commit 85c2321
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/react-router-dom/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -661,7 +661,7 @@ export const NavLink = React.forwardRef<HTMLAnchorElement, NavLinkProps>(
locationPathname === toPathname ||
(!end &&
locationPathname.startsWith(toPathname) &&
locationPathname.charAt(toPathname.length) === "/");
locationPathname.charAt(toPathname.length - 1) === "/");

let isPending =
nextLocationPathname != null &&
Expand Down

0 comments on commit 85c2321

Please sign in to comment.