-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🐛 Fixes reinitializing moved elements (#3995)
- Loading branch information
Showing
2 changed files
with
25 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -196,6 +196,7 @@ function onMutate(mutations) { | |
for (let node of addedNodes) { | ||
// If the node was eventually removed as part of one of his | ||
// parent mutations, skip it | ||
if (removedNodes.has(node)) continue | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
ekwoka
Author
Contributor
|
||
if (! node.isConnected) continue | ||
|
||
delete node._x_ignoreSelf | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@ekwoka I think we should check if the node has been already init (using
_x_isInit
) instead of checking the it's inside the removedNodes list