prevent derv stupids
This commit is contained in:
parent
33e40f1a3c
commit
106881dede
1 changed files with 6 additions and 2 deletions
8
site.js
8
site.js
|
@ -127,10 +127,14 @@ async function rounder(users, data, mode) {
|
|||
for (let h in data) {
|
||||
let dh = data[h];
|
||||
if (dh.following.length == 0 && dh.followers.length == 0) continue;
|
||||
endn = endn.concat(dh.following, dh.followers);
|
||||
let ffing = [...dh.following];
|
||||
let ffers = [...dh.followers];
|
||||
ffing.length = Math.min(ffing.length,userLimit);
|
||||
ffers.length = Math.min(ffers.length,userLimit);
|
||||
endn = endn.concat(ffing,ffers);
|
||||
endn = [...new Set(endn)];
|
||||
if (endn.length - oldLength > userLimit) break;
|
||||
}
|
||||
endn = [...new Set(endn)];
|
||||
|
||||
return endn;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue