Skip to content

find_anchor: null - (reading 'nodeType') #7876

@jycouet

Description

@jycouet

Describe the bug

From 1.0.0-next..565 (also present in 567), I get this error message when I toggle things in my app:

Uncaught TypeError: Cannot read properties of null (reading 'nodeType')
    at find_anchor (utils.js?v=d2b1608f:118:15)
    at HTMLDivElement.<anonymous> (client.js?t=1669722157478&v=d2b1608f:1447:38)

I think that it's link with the recent change here: https://github.com/sveltejs/kit/blob/master/packages/kit/src/runtime/client/utils.js#L118

Reproduction

I did a minimal repro here: https://github.com/jycouet/kit-issue-nodeType

Logs

No response

System Info

System:
    OS: Linux 5.15 Ubuntu 22.04.1 LTS 22.04.1 LTS (Jammy Jellyfish)
    CPU: (12) x64 12th Gen Intel(R) Core(TM) i7-1265U
    Memory: 10.36 GB / 15.54 GB
    Container: Yes
    Shell: 5.1.16 - /bin/bash
  Binaries:
    Node: 18.12.1 - ~/.volta/tools/image/node/18.12.1/bin/node
    Yarn: 3.2.4 - ~/.volta/tools/image/yarn/3.2.4/bin/yarn
    npm: 8.19.2 - ~/.volta/tools/image/node/18.12.1/bin/npm
  npmPackages:
    @sveltejs/adapter-auto: 1.0.0-next.90 => 1.0.0-next.90 
    @sveltejs/kit: 1.0.0-next.567 => 1.0.0-next.567 
    svelte: ^3.53.1 => 3.53.1 
    vite: ^3.2.4 => 3.2.4

Severity

blocking an upgrade

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions