aboutsummaryrefslogtreecommitdiff
path: root/src/cleaners/skyblock/profiles.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/cleaners/skyblock/profiles.ts')
-rw-r--r--src/cleaners/skyblock/profiles.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/cleaners/skyblock/profiles.ts b/src/cleaners/skyblock/profiles.ts
index a44fe48..a068dae 100644
--- a/src/cleaners/skyblock/profiles.ts
+++ b/src/cleaners/skyblock/profiles.ts
@@ -19,11 +19,11 @@ export function cleanPlayerSkyblockProfiles(rawProfiles: HypixelPlayerStatsSkyBl
/** Convert an array of raw profiles into clean profiles */
export async function cleanSkyblockProfilesResponse(data: any[]): Promise<CleanProfile[]> {
- const promises: Promise<CleanProfile | CleanFullProfile>[] = []
+ const promises: Promise<CleanProfile | CleanFullProfile | null>[] = []
for (const profile of data ?? []) {
// let cleanedProfile = await cleanSkyblockProfileResponseLighter(profile)
promises.push(cleanSkyblockProfileResponse(profile))
}
- const cleanedProfiles: CleanProfile[] = await Promise.all(promises)
+ const cleanedProfiles: CleanProfile[] = (await Promise.all(promises)).filter(p => p) as CleanProfile[]
return cleanedProfiles
}