fix: isArray check

This commit is contained in:
Barış Soner Uşaklı
2025-02-11 10:48:42 -05:00
parent 676acb7e8c
commit 5f3ed76d54

View File

@@ -231,7 +231,8 @@ Actors.getLocalFollowers = async (id) => {
};
Actors.getLocalFollowCounts = async (actors) => {
if (!Array.isArray(actors)) {
const isArray = Array.isArray(actors);
if (!isArray) {
actors = [actors];
}
@@ -251,7 +252,7 @@ Actors.getLocalFollowCounts = async (actors) => {
return { followers: followersCounts[index], following: followingCounts[index] };
});
return Array.isArray(actors) ? results : results[0];
return isArray ? results : results[0];
};
Actors.remove = async (id) => {