Skip to content

Commit

Permalink
fix: respect relative prop in NavLink for isActive
Browse files Browse the repository at this point in the history
  • Loading branch information
manzano78 committed Oct 12, 2022
1 parent 892238b commit 061c308
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions contributors.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@
- loun4
- lqze
- lukerSpringTree
- manzano78
- marc2332
- markivancho
- marvinruder
Expand Down
2 changes: 1 addition & 1 deletion packages/react-router-dom/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,7 @@ export const NavLink = React.forwardRef<HTMLAnchorElement, NavLinkProps>(
},
ref
) {
let path = useResolvedPath(to);
let path = useResolvedPath(to, { relative: rest.relative });
let match = useMatch({ path: path.pathname, end, caseSensitive });

let routerState = React.useContext(DataRouterStateContext);
Expand Down

0 comments on commit 061c308

Please sign in to comment.