aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormat <27899617+mat-1@users.noreply.github.com>2021-02-28 01:35:32 -0600
committermat <27899617+mat-1@users.noreply.github.com>2021-02-28 01:35:32 -0600
commitce7bd034cd5bd763c01674055ea88203bf806744 (patch)
tree63465ae8d73583e923d99a454a5f5a039d2a9792
parent6dadf95683a8b8574976c9d024b0b148521012f7 (diff)
downloadskyblock-api-ce7bd034cd5bd763c01674055ea88203bf806744.tar.gz
skyblock-api-ce7bd034cd5bd763c01674055ea88203bf806744.tar.bz2
skyblock-api-ce7bd034cd5bd763c01674055ea88203bf806744.zip
fix rank
-rw-r--r--src/cleaners/rank.ts6
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++'