Skip to content

Commit 56e7d8d

Browse files
committed
temporal workaround until sapper issue is fixed: sveltejs/sapper#904
1 parent f8ba62d commit 56e7d8d

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/routes/blog/[...slug].svelte

+7
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,13 @@
1313
</script>
1414

1515
<script>
16+
// TODO remove workaround for this issue https://github.com/sveltejs/sapper/issues/904
17+
import { onMount } from 'svelte'
18+
onMount(async () => {
19+
;[...document.querySelectorAll('a[href^="#"]')].map(
20+
x => (x.href = document.location + new URL(x.href).hash)
21+
)
22+
})
1623
import {getIsoDateStr} from '../../services/dates';
1724
export let post;
1825
</script>

0 commit comments

Comments
 (0)