Unfold when there's less than 100 nodes to show
gitea/salix/pipeline/head This commit looks good Details

This commit is contained in:
Joan Sanchez 2022-10-10 10:25:59 +02:00
parent d104a048d8
commit 31d1b84bb9
1 changed files with 4 additions and 1 deletions

View File

@ -59,7 +59,10 @@ module.exports = Self => {
}
const leaves = map.get(parentId);
setLeaves(leaves);
const maxNodes = 100;
if (res.length <= maxNodes)
setLeaves(leaves);
return leaves || [];
};