diff options
author | mat <github@matdoes.dev> | 2022-05-19 19:13:56 +0000 |
---|---|---|
committer | mat <github@matdoes.dev> | 2022-05-19 19:13:56 +0000 |
commit | 69311ed3e8e42d427f5053ae944be21af96f130b (patch) | |
tree | 305e896b392bc51ce32ce6ca2982c93b9035422c /src/cleaners | |
parent | a7d20149e6cfebec77b5c0ecc95ca55d23d02e94 (diff) | |
download | skyblock-api-69311ed3e8e42d427f5053ae944be21af96f130b.tar.gz skyblock-api-69311ed3e8e42d427f5053ae944be21af96f130b.tar.bz2 skyblock-api-69311ed3e8e42d427f5053ae944be21af96f130b.zip |
fix for realsies
Diffstat (limited to 'src/cleaners')
-rw-r--r-- | src/cleaners/achievements.ts | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/cleaners/achievements.ts b/src/cleaners/achievements.ts index 3e93532..372ab77 100644 --- a/src/cleaners/achievements.ts +++ b/src/cleaners/achievements.ts @@ -26,6 +26,7 @@ export async function cleanPlayerAchievements(data: typedHypixelApi.PlayerDataRe for (const [gameId, achievementsData] of Object.entries(gameAchievements)) { if (gameId !== 'skyblock') continue + let tieredAchievements: TieredAchievement[] = [] for (const [achievementId, achievementData] of Object.entries(achievementsData.tiered)) { const value = data.achievements[`skyblock_${achievementId}`] ?? undefined @@ -33,7 +34,7 @@ export async function cleanPlayerAchievements(data: typedHypixelApi.PlayerDataRe id: achievementId.toLowerCase(), name: achievementData.name, value, - description: achievementData.description.replace(/%s/g, value.toString()) + description: value ? achievementData.description.replace(/%s/g, value.toString()) : achievementData.description }) } |