Skip to content

Commit

Permalink
fix active detection for url's containing international characters
Browse files Browse the repository at this point in the history
  • Loading branch information
rvlzzr committed Oct 1, 2024
1 parent ec95237 commit 706d569
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export function A(props: AnchorProps) {
const to_ = to();
if (to_ === undefined) return [false, false];
const path = normalizePath(to_.split(/[?#]/, 1)[0]).toLowerCase();
const loc = normalizePath(location.pathname).toLowerCase();
const loc = decodeURI(normalizePath(location.pathname).toLowerCase());
return [props.end ? path === loc : loc.startsWith(path + "/") || loc === path, path === loc];
});

Expand Down

0 comments on commit 706d569

Please sign in to comment.