diff options
author | mat <27899617+mat-1@users.noreply.github.com> | 2021-04-09 11:12:06 -0500 |
---|---|---|
committer | mat <27899617+mat-1@users.noreply.github.com> | 2021-04-09 11:12:06 -0500 |
commit | d8199c5dbc9031ddd12a1609d118aef62715d151 (patch) | |
tree | f315c19f239523b7861d4cbdcfb48f24fcdc5ec0 /build/database.js | |
parent | e861e397b51fcad6ce459a7074b7a34fabc61734 (diff) | |
download | skyblock-api-d8199c5dbc9031ddd12a1609d118aef62715d151.tar.gz skyblock-api-d8199c5dbc9031ddd12a1609d118aef62715d151.tar.bz2 skyblock-api-d8199c5dbc9031ddd12a1609d118aef62715d151.zip |
fix people not being added to small leaderboards
Diffstat (limited to 'build/database.js')
-rw-r--r-- | build/database.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/build/database.js b/build/database.js index f397c3e..b40d30c 100644 --- a/build/database.js +++ b/build/database.js @@ -207,8 +207,10 @@ async function getApplicableAttributes(member) { for (const [leaderboard, attributeValue] of Object.entries(leaderboardAttributes)) { const requirement = await getMemberLeaderboardRequirement(leaderboard); const leaderboardReversed = isLeaderboardReversed(leaderboard); - if (!requirement || leaderboardReversed ? attributeValue < requirement : attributeValue > requirement) + if ((requirement === null) + || (leaderboardReversed ? attributeValue < requirement : attributeValue > requirement)) { applicableAttributes[leaderboard] = attributeValue; + } } return applicableAttributes; } |