dev.delete #19

Merged
Siklos merged 2 commits from dev.delete into dev 2022-08-08 09:41:54 -04:00
Showing only changes of commit 7b23283201 - Show all commits

View file

@ -11,14 +11,14 @@ export function * MakeIterator(root: IContainerModel): Generator<IContainerModel
yield container;
// if this reverse() gets costly, replace it by a simple for
container.children.forEach((child) => {
for (let i = container.children.length - 1; i >= 0; i--) {
const child = container.children[i];
if (visited.has(child)) {
return;
}
visited.add(child);
queue.push(child);
});
}
}
}