We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6d486b7 commit fb37954Copy full SHA for fb37954
src/components/Link.tsx
@@ -58,11 +58,12 @@ export const BaseLink = forwardRef(function Link(
58
ref
59
) {
60
const { asPath } = useRouter()
61
+ const cleanAsPath = asPath.replace(/#.*/, "");
62
const { flipForRtl } = useRtlFlip()
63
64
let href = (to ?? hrefProp) as string
65
- const isActive = url.isHrefActive(href, asPath, isPartiallyActive)
66
+ const isActive = url.isHrefActive(href, cleanAsPath, isPartiallyActive)
67
const isDiscordInvite = url.isDiscordInvite(href)
68
const isPdf = url.isPdf(href)
69
const isExternal = url.isExternal(href)
0 commit comments