Commit 1b8e3d82 authored by 阿尔卑斯's avatar 阿尔卑斯 Committed by island205

Tree: Modify loop conditions to improve performance (#15699)

parent d274358d
......@@ -44,10 +44,7 @@ export default class TreeStore {
if (!node.visible && childNodes.length) {
let allHidden = true;
childNodes.forEach((child) => {
if (child.visible) allHidden = false;
});
allHidden = !childNodes.some(child => child.visible);
if (node.root) {
node.root.visible = allHidden === false;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment