Skip to content

undefined not omitted in <svelte:head> with page store #14548

@hyunbinseo

Description

@hyunbinseo

Describe the bug

<script>
  import { page } from '$app/state';
</script>

<svelte:head>
  <!-- non-defined key -->
  <title>{page.data?.a}</title>
</svelte:head>

In client-side rendering (browser)

<title>undefined</title>

In pre-rendered HTML

<title></title>

Reproduction

https://github.com/hyunbinseo/svelte-kit-14548

System Info

System:
  OS: Windows 11 10.0.26100
  CPU: (8) x64 Intel(R) Core(TM) Ultra 7 258V
  Memory: 7.42 GB / 31.48 GB
Binaries:
  Node: 24.9.0 - ~\AppData\Local\fnm_multishells\42696_1759035529459\node.EXE
  Yarn: 1.22.22 - ~\AppData\Local\fnm_multishells\42696_1759035529459\yarn.CMD
  npm: 11.6.0 - ~\AppData\Local\fnm_multishells\42696_1759035529459\npm.CMD
  pnpm: 10.17.1 - ~\AppData\Local\fnm_multishells\42696_1759035529459\pnpm.CMD
  Deno: 2.4.0 - ~\.deno\bin\deno.EXE
Browsers:
  Edge: Chromium (140.0.3485.54)
npmPackages:
  @sveltejs/adapter-auto: ^6.1.0 => 6.1.0
  @sveltejs/kit: ^2.43.5 => 2.43.5
  @sveltejs/vite-plugin-svelte: ^6.2.1 => 6.2.1
  svelte: ^5.39.6 => 5.39.6
  vite: ^7.1.7 => 7.1.7

Severity

annoyance

Additional Information

Checked on [email protected] and [email protected]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions