aboutsummaryrefslogtreecommitdiff
path: root/src/cleaners
diff options
context:
space:
mode:
authormat <github@matdoes.dev>2022-05-19 19:13:56 +0000
committermat <github@matdoes.dev>2022-05-19 19:13:56 +0000
commit69311ed3e8e42d427f5053ae944be21af96f130b (patch)
tree305e896b392bc51ce32ce6ca2982c93b9035422c /src/cleaners
parenta7d20149e6cfebec77b5c0ecc95ca55d23d02e94 (diff)
downloadskyblock-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.ts3
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
})
}