Skip to content

Array splice leads to infinite loop in each block #16726

@PatrickG

Description

@PatrickG

Describe the bug

This REPL comes from a help thread on discord.
Somehow the second cards.splice() (line 26) leads to an infinite loop in the {#each} block.

I could track it down to this while loop:

while (node !== null && node !== end) {
var next_node = /** @type {TemplateNode} */ (get_next_sibling(node));
dest.before(node);
node = next_node;
}

I was not able to create a minimal reproduction of this issue.
Edit: It could mean the used libraray (@dnd-kit/dom/sortable) is messing with the dom, right?

Reproduction

https://svelte.dev/playground/d998c7ccb83e4e58a24f9286cc334d81?version=5.38.7
Move a card

Logs

System Info

Svelte: 5.38.7

Severity

annoyance

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