Skip to content

Commit 061c308

Browse files
fix: respect relative prop in NavLink for isActive
1 parent 892238b commit 061c308

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

contributors.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@
7272
- loun4
7373
- lqze
7474
- lukerSpringTree
75+
- manzano78
7576
- marc2332
7677
- markivancho
7778
- marvinruder

packages/react-router-dom/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -441,7 +441,7 @@ export const NavLink = React.forwardRef<HTMLAnchorElement, NavLinkProps>(
441441
},
442442
ref
443443
) {
444-
let path = useResolvedPath(to);
444+
let path = useResolvedPath(to, { relative: rest.relative });
445445
let match = useMatch({ path: path.pathname, end, caseSensitive });
446446

447447
let routerState = React.useContext(DataRouterStateContext);

0 commit comments

Comments
 (0)