Closed voidpls closed 3 years ago
I’m not using .map because sometimes there will be entries with 0 invites, and I don’t want those to show. I’ll look into a fix for this though, thanks.
The .filter
should remove any entries with 0 invites
Ah ok.
This has been fixed in v2.0.5!
https://i.imgur.com/ZuAn35N.png
The quantities and order are correct, but the numbers for the rankings are all wrong.
It seems like this is caused by the asynchronous code here:
LB.length
is 0 in each iteration, because theLB.push()
from the previous iteration has not completed yet, due to each iteration not waiting for earlier promises to resolve.Replacing the original snippet with this seems to fix it, but I haven't done enough testing to confidently PR it.