Skip to content

Commit

Permalink
🐛 Prevents Moved elements from being cleaned up
Browse files Browse the repository at this point in the history
  • Loading branch information
ekwoka committed Nov 28, 2024
1 parent 2c57a98 commit 2602b25
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions packages/alpinejs/src/mutation.js
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,6 @@ function onMutate(mutations) {

mutations[i].addedNodes.forEach(node => {
if (node.nodeType !== 1) return
if (node._x_marker) return

addedNodes.push(node)
})
Expand Down Expand Up @@ -198,7 +197,7 @@ function onMutate(mutations) {

for (let node of addedNodes) {
if (! node.isConnected) continue

if (node._x_marker) return;
onElAddeds.forEach(i => i(node))
}

Expand Down

0 comments on commit 2602b25

Please sign in to comment.