diff --git a/src/lib/layout/shell.svelte b/src/lib/layout/shell.svelte index 83edffe7c3..b7d1ff0970 100644 --- a/src/lib/layout/shell.svelte +++ b/src/lib/layout/shell.svelte @@ -30,8 +30,7 @@ * Cancel navigation when wizard is open and triggered by popstate */ beforeNavigate((n) => { - const external = n?.to?.url?.hostname !== globalThis?.location?.hostname; - if (external) return; + if (n.willUnload) return; if (!($wizard.show || $wizard.cover)) return; if (n.type === 'popstate') { n.cancel();