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:09:18 +02:00
parent ca348fbb51
commit 74a415a122
No known key found for this signature in database
GPG key ID: 49A163D0D14E6FD8

View file

@ -783,9 +783,7 @@ const filterEdgesByDepth = (sourceIds, depth) => {
};
const filtered = edges.filter(d => sourceIds.includes(d.source) || sourceIds.includes(d.target));
const srcIds = filtered.map(d => d.source);
const dstIds = filtered.map(d => d.target);
const nextIds = srcIds.concat(dstIds);
const nextIds = [].concat(filtered.map(d => d.source)).concat(filtered.map(d => d.target));
let ret = [].concat(filtered);