mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 16:46:12 +01:00
fix: isArray check
This commit is contained in:
@@ -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) => {
|
||||
|
||||
Reference in New Issue
Block a user