serialize newly added nodes and update id node map when childList changed

This commit is contained in:
Yanzhen Yu
2026-04-01 12:00:00 +08:00
parent ee4fc3ce7e
commit ad2ac811a3
3 changed files with 8 additions and 2 deletions

View File

@@ -17,6 +17,10 @@ export const mirror: Mirror = {
getNode(id) {
return mirror.map[id];
},
removeNodeFromMap(n) {
const id = n.__sn && n.__sn.id;
delete mirror.map[id];
},
};
// copy from underscore