From ce7bd034cd5bd763c01674055ea88203bf806744 Mon Sep 17 00:00:00 2001 From: mat <27899617+mat-1@users.noreply.github.com> Date: Sun, 28 Feb 2021 01:35:32 -0600 Subject: fix rank --- src/cleaners/rank.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src') 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++' -- cgit