diff options
author | mat-1 <github@matdoes.dev> | 2021-02-28 07:36:12 +0000 |
---|---|---|
committer | mat-1 <github@matdoes.dev> | 2021-02-28 07:36:12 +0000 |
commit | e0b595a000f9111e3779d56b2c70b864d6ad3046 (patch) | |
tree | 36dc48b30da4c4e2bab287ff6eb70a724103b42c /build | |
parent | 5bf261102017e6489af9b604a3a60cc8083c97d7 (diff) | |
download | skyblock-api-e0b595a000f9111e3779d56b2c70b864d6ad3046.tar.gz skyblock-api-e0b595a000f9111e3779d56b2c70b864d6ad3046.tar.bz2 skyblock-api-e0b595a000f9111e3779d56b2c70b864d6ad3046.zip |
Compiled TS into JS
Diffstat (limited to 'build')
-rw-r--r-- | build/cleaners/rank.js | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/build/cleaners/rank.js b/build/cleaners/rank.js index a9e5f35..4fef6c0 100644 --- a/build/cleaners/rank.js +++ b/build/cleaners/rank.js @@ -16,6 +16,7 @@ const rankColors = { }; /** Response cleaning (reformatting to be nicer) */ function cleanRank({ packageRank, newPackageRank, monthlyPackageRank, rankPlusColor, rank, prefix }) { + var _a; let name; let color; let colored; @@ -25,12 +26,10 @@ function cleanRank({ packageRank, newPackageRank, monthlyPackageRank, rankPlusCo name = colored.replace(/ยง./g, '').replace(/[\[\]]/g, ''); } else { - if (monthlyPackageRank !== 'NONE') + if (monthlyPackageRank && monthlyPackageRank !== 'NONE') name = monthlyPackageRank; else - name = rank - || (newPackageRank === null || newPackageRank === void 0 ? void 0 : newPackageRank.replace('_PLUS', '+')) - || (packageRank === null || packageRank === void 0 ? void 0 : packageRank.replace('_PLUS', '+')); + name = (_a = rank !== null && rank !== void 0 ? rank : newPackageRank === null || newPackageRank === void 0 ? void 0 : newPackageRank.replace('_PLUS', '+')) !== null && _a !== void 0 ? _a : packageRank === null || packageRank === void 0 ? void 0 : packageRank.replace('_PLUS', '+'); // MVP++ is called Superstar for some reason if (name === 'SUPERSTAR') name = 'MVP++'; |