diff options
author | mat <github@matdoes.dev> | 2022-03-27 17:38:12 -0500 |
---|---|---|
committer | mat <github@matdoes.dev> | 2022-03-27 17:38:12 -0500 |
commit | a789330d340b55c0f4e00ea33045b32d84ee4d35 (patch) | |
tree | 7a4ecdb3ee16d4bc58bf4c870d40fbbff20eaa16 /src/cleaners/skyblock/harp.ts | |
parent | ab70a393dad8d4fea99cb3ebe1ca9c167e71655a (diff) | |
download | skyblock-api-a789330d340b55c0f4e00ea33045b32d84ee4d35.tar.gz skyblock-api-a789330d340b55c0f4e00ea33045b32d84ee4d35.tar.bz2 skyblock-api-a789330d340b55c0f4e00ea33045b32d84ee4d35.zip |
Fix harp things being undefined
Diffstat (limited to 'src/cleaners/skyblock/harp.ts')
-rw-r--r-- | src/cleaners/skyblock/harp.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/cleaners/skyblock/harp.ts b/src/cleaners/skyblock/harp.ts index 067c1de..83862b3 100644 --- a/src/cleaners/skyblock/harp.ts +++ b/src/cleaners/skyblock/harp.ts @@ -29,9 +29,9 @@ export async function cleanHarp(data: typedHypixelApi.SkyBlockProfileMember): Pr const songName = item.slice('song_'.length, -'_best_completion'.length) songs.push({ id: songName, - completions: data.harp_quest[`song_${songName}_completions`], - perfectCompletions: data.harp_quest[`song_${songName}_perfect_completions`], - progress: data.harp_quest[`song_${songName}_best_completion`] + completions: data.harp_quest[`song_${songName}_completions`] ?? 0, + perfectCompletions: data.harp_quest[`song_${songName}_perfect_completions`] ?? 0, + progress: data.harp_quest[`song_${songName}_best_completion`] ?? 0 }) } } |