defer getExtendedFollows

This commit is contained in:
Martti Malmi 2022-06-28 12:11:18 +03:00
parent 7eb5aa94d9
commit 37843a24f6

View File

@ -85,7 +85,7 @@ const getExtendedFollows = _.throttle((callback, k, maxDepth = 3, currentDepth =
if (isFollowing) {
addFollow(callback, followedKey, currentDepth, k);
if (currentDepth < maxDepth) {
getExtendedFollows(callback, followedKey, maxDepth, currentDepth + 1);
_.defer(() => getExtendedFollows(callback, followedKey, maxDepth, currentDepth + 1));
}
} else {
removeFollow(followedKey, currentDepth, k);