From c0bfed834339d987b62a6aa45e45fb7fbed5656e Mon Sep 17 00:00:00 2001 From: memdmp Date: Wed, 14 Jan 2026 01:59:25 +0100 Subject: fix: properly allow js hmr when navigating between pages from the index to the skip anim page --- src/routes/IndexPage.svelte | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'src/routes/IndexPage.svelte') diff --git a/src/routes/IndexPage.svelte b/src/routes/IndexPage.svelte index c2d07eb..fec5d44 100644 --- a/src/routes/IndexPage.svelte +++ b/src/routes/IndexPage.svelte @@ -23,7 +23,7 @@ type TTYText, } from './shared'; import { onDestroy, onMount } from 'svelte'; - import { base } from '$app/paths'; + import { resolve } from '$app/paths'; const initTagLine = `line flex flex-row flex-wrap gap-3 justify-between`; @@ -42,8 +42,8 @@ skipAnimation?: boolean; } = $props(); onMount(() => { - if (skipAnimation && location.pathname !== base + '/skip-animation') - history.replaceState({}, '', base + '/skip-animation'); + if (skipAnimation && location.pathname !== resolve('/skip-animation')) + history.replaceState({}, '', resolve('/skip-animation')); }); let isScripted = $state(false); @@ -111,7 +111,7 @@ {#if section.url.startsWith('newtab:')} {@const url = section.url.substring(7)} {@render ttyTextInnerRenderer(section)} @@ -170,9 +170,12 @@
{#if !skipAnimation}