Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

afterNavigate fires twice when SSR is turned off #13573

Closed
Serator opened this issue Mar 12, 2025 · 0 comments · Fixed by #13593
Closed

afterNavigate fires twice when SSR is turned off #13573

Serator opened this issue Mar 12, 2025 · 0 comments · Fixed by #13593
Labels
bug Something isn't working router

Comments

@Serator
Copy link

Serator commented Mar 12, 2025

Describe the bug

When opening a page with SSR turned off, afterNavigate fires twice. beforeNavigate and onNavigate work as expected.

+layout.ts

export const ssr = false

+page.svelte

<script lang="ts">
  import {afterNavigate} from '$app/navigation'

  afterNavigate((e) => {
    console.log(e)
  })
</script>
Image

Reproduction

SvelteKit 2.5.27

SvelteKit 2.19.0

Severity

annoyance

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working router
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants