close #263 Since we improved the block class strategy,

we need to check parent node before pushAdd.
This commit is contained in:
Yanzhen Yu
2026-04-01 12:00:00 +08:00
parent cf272f65ef
commit 0d6fe56b80

View File

@@ -78,6 +78,9 @@ export default class MutationBuffer {
*/
const addQueue: Node[] = [];
const pushAdd = (n: Node) => {
if (!n.parentNode) {
return;
}
const parentId = mirror.getId((n.parentNode as Node) as INode);
const nextId =
n.nextSibling && mirror.getId((n.nextSibling as unknown) as INode);