Skip to content

Commit 84c617e

Browse files
committed
defensive copy
1 parent 8f94aba commit 84c617e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

apps/svelte.dev/src/routes/docs/[...path]/+page.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
}
3939
for (const el of elements) {
4040
if (el.id.toLocaleLowerCase() === hash.toLocaleLowerCase()) {
41-
const url = $page.url;
41+
const url = new URL($page.url);
4242
url.hash = el.id;
4343
return url;
4444
}

0 commit comments

Comments
 (0)