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 d1f5d5d commit 0c4c2b0Copy full SHA for 0c4c2b0
sites/svelte-5-preview/src/routes/+page.svelte
@@ -1,6 +1,7 @@
1
<script>
2
import { theme } from '@sveltejs/site-kit/stores';
3
import '@sveltejs/site-kit/styles/index.css';
4
+ import { replaceState } from '$app/navigation';
5
6
import Repl from '$lib/Repl.svelte';
7
import { default_files } from './defaults.js';
@@ -69,10 +70,9 @@
69
70
71
setting_hash = true;
72
- history.replaceState(
73
- history.state,
74
- '',
75
- `${location.pathname}${location.search}#${await compress_and_encode_text(json)}`
+ replaceState(
+ `${location.pathname}${location.search}#${await compress_and_encode_text(json)}`,
+ {}
76
);
77
}
78
</script>
0 commit comments