diff options
author | mat <27899617+mat-1@users.noreply.github.com> | 2021-02-28 01:35:32 -0600 |
---|---|---|
committer | mat <27899617+mat-1@users.noreply.github.com> | 2021-02-28 01:35:32 -0600 |
commit | ce7bd034cd5bd763c01674055ea88203bf806744 (patch) | |
tree | 63465ae8d73583e923d99a454a5f5a039d2a9792 /src/cleaners | |
parent | 6dadf95683a8b8574976c9d024b0b148521012f7 (diff) | |
download | skyblock-api-ce7bd034cd5bd763c01674055ea88203bf806744.tar.gz skyblock-api-ce7bd034cd5bd763c01674055ea88203bf806744.tar.bz2 skyblock-api-ce7bd034cd5bd763c01674055ea88203bf806744.zip |
fix rank
Diffstat (limited to 'src/cleaners')
-rw-r--r-- | src/cleaners/rank.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/cleaners/rank.ts b/src/cleaners/rank.ts index 0a3a4a7..0e17a17 100644 --- a/src/cleaners/rank.ts +++ b/src/cleaners/rank.ts @@ -37,12 +37,12 @@ export function cleanRank({ color = minecraftColorCodes[colored.match(/§./)[0][1]] name = colored.replace(/§./g, '').replace(/[\[\]]/g, '') } else { - if (monthlyPackageRank !== 'NONE') + if (monthlyPackageRank && monthlyPackageRank !== 'NONE') name = monthlyPackageRank else name = rank - || newPackageRank?.replace('_PLUS', '+') - || packageRank?.replace('_PLUS', '+') + ?? newPackageRank?.replace('_PLUS', '+') + ?? packageRank?.replace('_PLUS', '+') // MVP++ is called Superstar for some reason if (name === 'SUPERSTAR') name = 'MVP++' |