Skip to content

Commit

Permalink
Include all nodes in tree.toJSInfoForTest (#832)
Browse files Browse the repository at this point in the history
  • Loading branch information
chacha912 authored May 30, 2024
1 parent c5e7e3a commit bab2d82
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/document/crdt/tree.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1356,10 +1356,10 @@ export class CRDTTree extends CRDTElement implements GCParent {
pos,
};

for (let i = 0; i < node.children.length; i++) {
const leftChildNode = i === 0 ? node : node.children[i - 1];
for (let i = 0; i < node.allChildren.length; i++) {
const leftChildNode = i === 0 ? node : node.allChildren[i - 1];
nodeInfo.children.push(
toTreeNodeInfo(node.children[i], node, leftChildNode, depth + 1),
toTreeNodeInfo(node.allChildren[i], node, leftChildNode, depth + 1),
);
}

Expand Down

0 comments on commit bab2d82

Please sign in to comment.