Skip to content

Async derived causes <title> to not be updated #15295

@teemingc

Description

@teemingc

Describe the bug

If I use an async derived, the title in the head element doesn't get updated.

Reproduction

https://stackblitz.com/edit/sveltejs-kit-template-default-lpchlpus?file=src%2Froutes%2Fabout%2F%5Bid%5D%2F%2Bpage.svelte

  1. Observe the current page title
  2. Navigate to the about page
  3. Observe that it doesn't change

Logs

System Info

System:
    OS: Linux 5.0 undefined
    CPU: (8) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
    Memory: 0 Bytes / 0 Bytes
    Shell: 1.0 - /bin/jsh
  Binaries:
    Node: 20.19.1 - /usr/local/bin/node
    Yarn: 1.22.19 - /usr/local/bin/yarn
    npm: 10.8.2 - /usr/local/bin/npm
    pnpm: 8.15.6 - /usr/local/bin/pnpm
  npmPackages:
    @sveltejs/adapter-auto: ^7.0.0 => 7.0.0 
    @sveltejs/kit: ^2.48.5 => 2.50.2 
    @sveltejs/vite-plugin-svelte: ^6.2.1 => 6.2.4 
    svelte: ^5.43.8 => 5.50.0 
    vite: ^7.2.2 => 7.3.1

Severity

annoyance

Additional Information

Workaround is to not use an async derived and to call the remote function directly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions