some comments
This commit is contained in:
parent
921c205e22
commit
32bd9f2601
|
@ -99,6 +99,7 @@ const areTreeNodesEqual = (children1, children2) => {
|
|||
|
||||
let isEqual = false
|
||||
for (let i = 0; i < children1.length; i++) {
|
||||
// same context and same children, then nothing has changed
|
||||
isEqual =
|
||||
deepEqual(children1[i].context, children2[i].context) &&
|
||||
areTreeNodesEqual(children1[i].children, children2[i].children)
|
||||
|
|
|
@ -79,6 +79,7 @@ export const createTreeNode = () => ({
|
|||
const node = this
|
||||
return () => {
|
||||
if (node.children) {
|
||||
// destroy children first - from leaf nodes up
|
||||
for (let child of node.children) {
|
||||
child.destroy()
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue