1
0
Fork 0
mirror of https://github.com/anyproto/anytype-ts.git synced 2025-06-09 09:35:02 +09:00

fix performance

This commit is contained in:
Andrew Simachev 2024-07-25 14:08:24 +02:00
parent c7d24b1a2d
commit ca348fbb51
No known key found for this signature in database
GPG key ID: 49A163D0D14E6FD8

View file

@ -790,11 +790,7 @@ const filterEdgesByDepth = (sourceIds, depth) => {
let ret = [].concat(filtered);
if (nextIds.length && (depth > 1)) {
const nextDepth = depth - 1;
filtered.forEach(() => {
ret = ret.concat(filterEdgesByDepth(nextIds, nextDepth));
});
ret = ret.concat(filterEdgesByDepth(nextIds, depth - 1));
};
return ret;