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

<component> childrens in svelte:head are not destroyed from route to route #9332

Open
enda opened this issue Oct 18, 2023 · 1 comment
Open

Comments

@enda
Copy link

enda commented Oct 18, 2023

Describe the bug

When using a component in <svelte:head />, the component is not destroy when route change

Maybe related: #9329

Reproduction

Create an app

npm create svelte@latest my-app
cd my-app
npm install
npm run dev -- --open

Create a component Test.svelte:

<!-- Test.svelte -->
<link rel="hello" as="world" />

Edit src/routes/+page.svelte
Add component in <svelte:head />

Open browser and console, change route, the <link rel="hello" as="world" /> is still there. Go back to home, the <link rel="hello" as="world" /> is present twice.

Logs

No log

System Info

System:
    OS: macOS 13.5.2
    CPU: (8) x64 Intel(R) Core(TM) i7-8557U CPU @ 1.70GHz
    Memory: 174.19 MB / 16.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 16.17.0 - ~/.nvm/versions/node/v16.17.0/bin/node
    npm: 8.15.0 - ~/.nvm/versions/node/v16.17.0/bin/npm
  Browsers:
    Chrome: 118.0.5993.70
    Safari: 16.6
  npmPackages:
    @sveltejs/adapter-auto: ^2.0.0 => 2.1.0 
    @sveltejs/adapter-node: ^1.3.1 => 1.3.1 
    @sveltejs/kit: ^1.20.4 => 1.25.2 
    svelte: ^4.0.5 => 4.2.1 
    vite: ^4.4.2 => 4.4.11

Severity

annoyance

@enda
Copy link
Author

enda commented Mar 31, 2024

any update on this one ?

It still a bug on svelte 4.2.12

  System:
    OS: macOS 14.2.1
    CPU: (8) x64 Intel(R) Core(TM) i7-8557U CPU @ 1.70GHz
    Memory: 472.61 MB / 16.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 18.20.0 - ~/.nvm/versions/node/v18.20.0/bin/node
    npm: 10.5.0 - ~/.nvm/versions/node/v18.20.0/bin/npm
  Browsers:
    Chrome: 123.0.6312.87
    Safari: 17.2.1
  npmPackages:
    svelte: ^4.0.5 => 4.2.12 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant