Skip to content

Commit

Permalink
Merge pull request #270 from WoodyWoodsta/root-route-resolve
Browse files Browse the repository at this point in the history
fix: treat "/" like any other absolute path
  • Loading branch information
krishnaTORQUE authored Nov 24, 2023
2 parents a9cf9dc + 4f07656 commit 3092f96
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Link.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
const dispatch = createEventDispatcher();

let href, isPartiallyCurrent, isCurrent, props;
$: href = to === "/" ? $base.uri : resolve(to, $base.uri);
$: href = resolve(to, $base.uri);
$: isPartiallyCurrent = $location.pathname.startsWith(href);
$: isCurrent = href === $location.pathname;
$: ariaCurrent = isCurrent ? "page" : undefined;
Expand Down

0 comments on commit 3092f96

Please sign in to comment.