Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/lib/Link/Link.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@
prependBasePath,
preserveQuery,
children,
onclick: incomingOnclick,
...restProps
}: Props = $props();
Expand All @@ -101,10 +102,11 @@
)
);
function handleClick(event: MouseEvent) {
function handleClick(event: MouseEvent & { currentTarget: EventTarget & HTMLAnchorElement }) {
event.preventDefault();
const newState = calculateState(resolvedHash, typeof state === 'function' ? state() : state);
location.goTo(calcHref, { state: newState, replace: calcReplace });
incomingOnclick?.(event);
}
function styleString() {
Expand Down