dum bfix
This commit is contained in:
parent
a855057c6e
commit
a0f16b3008
1 changed files with 6 additions and 5 deletions
11
site.js
11
site.js
|
@ -176,22 +176,23 @@ async function siteCollector(user, path, site, useLimit) {
|
|||
p = p.concat(congested);
|
||||
await Promise.all(p);
|
||||
|
||||
for (let u of users) {
|
||||
for (let uf in users) {
|
||||
let u = users[uf];
|
||||
if (!u) continue;
|
||||
let { following, followers } = u;
|
||||
if (!following || !followers) continue;
|
||||
for (let f of followers) {
|
||||
if (!users[f]) users[f] = {};
|
||||
if (!users[f].following) users[f].following = [];
|
||||
if (users[f].following.indexOf(u) == -1) {
|
||||
users[f].following.push(u);
|
||||
if (users[f].following.indexOf(uf) == -1) {
|
||||
users[f].following.push(uf);
|
||||
}
|
||||
}
|
||||
for (let f of following) {
|
||||
if (!users[f]) users[f] = {};
|
||||
if (!users[f].followers) users[f].followers = [];
|
||||
if (users[f].followers.indexOf(u) == -1) {
|
||||
users[f].followers.push(u);
|
||||
if (users[f].followers.indexOf(uf) == -1) {
|
||||
users[f].followers.push(uf);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue