Fix reversed list

This commit is contained in:
Siklos 2022-08-01 22:35:04 +02:00
parent 05622c3a64
commit 0dc078493a

View file

@ -26,7 +26,8 @@ export class ElementsSidebar extends React.Component<IElementsSidebarProps> {
handleContainer(container); handleContainer(container);
container.props.children.forEach((child) => { // if this reverse() gets costly, replace it by a simple for
container.props.children.reverse().forEach((child) => {
if (visited.has(child)) { if (visited.has(child)) {
return; return;
} }