some comments
This commit is contained in:
parent
9424cbb615
commit
94509a814d
|
@ -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