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

"node is null" when manipulating an array state in a Snippet #12177

Closed
ChristopheCorbalan opened this issue Jun 25, 2024 · 4 comments · Fixed by #12215
Closed

"node is null" when manipulating an array state in a Snippet #12177

ChristopheCorbalan opened this issue Jun 25, 2024 · 4 comments · Fixed by #12215
Assignees
Labels
Milestone

Comments

@ChristopheCorbalan
Copy link

ChristopheCorbalan commented Jun 25, 2024

Describe the bug

When re-arranging an array state which is displayed inside an {#each} block via a snippet it does trigger an error saying "node is null".

The bug disappear if I remove the key parameter in the each block or if I don't use the snippet.

Reproduction

REPL

Logs

No response

System Info

System:
    OS: macOS 14.4
    CPU: (12) arm64 Apple M2 Max
    Memory: 8.70 GB / 32.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 20.6.1 - ~/.nvm/versions/node/v20.6.1/bin/node
    npm: 10.1.0 - ~/.nvm/versions/node/v20.6.1/bin/npm
    bun: 1.1.13 - ~/.bun/bin/bun
  Browsers:
    Chrome: 126.0.6478.114
    Firefox Nightly: 128.0a1
    Safari: 17.4

Severity

blocking an upgrade

@ChristopheCorbalan
Copy link
Author

This bug seems to be happening since [email protected]

@trueadm trueadm added the bug label Jun 25, 2024
@trueadm trueadm added this to the 5.0 milestone Jun 25, 2024
@trueadm
Copy link
Contributor

trueadm commented Jun 25, 2024

Seems related to #12123 @dummdidumm.

@dummdidumm
Copy link
Member

dummdidumm commented Jun 25, 2024

Locally reverted that commit, didn't change anything. This must be from another version.
My guess is this happens because of the if block: the entries are not all of the same length (dom-node-wise) so the move function inside the each somehow breaks.

@trueadm trueadm self-assigned this Jun 25, 2024
@trueadm
Copy link
Contributor

trueadm commented Jun 25, 2024

@dummdidumm Thanks for validating, I think I know what this is regarding now.

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