Skip to content

afterNavigate fires twice when SSR is turned off #13573

@Serator

Description

@Serator

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingrouter

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions