aboutsummaryrefslogtreecommitdiff
path: root/build
diff options
context:
space:
mode:
Diffstat (limited to 'build')
-rw-r--r--build/cleaners/skyblock/profile.js2
-rw-r--r--build/cleaners/skyblock/profiles.js2
2 files changed, 3 insertions, 1 deletions
diff --git a/build/cleaners/skyblock/profile.js b/build/cleaners/skyblock/profile.js
index da988cc..6460c3b 100644
--- a/build/cleaners/skyblock/profile.js
+++ b/build/cleaners/skyblock/profile.js
@@ -48,6 +48,8 @@ exports.cleanSkyblockProfileResponseLighter = cleanSkyblockProfileResponseLighte
async function cleanSkyblockProfileResponse(data, options) {
// We use Promise.all so it can fetch all the users at once instead of waiting for the previous promise to complete
const promises = [];
+ if (!data)
+ return null;
for (const memberUUID in data.members) {
const memberRaw = data.members[memberUUID];
memberRaw.uuid = memberUUID;
diff --git a/build/cleaners/skyblock/profiles.js b/build/cleaners/skyblock/profiles.js
index ba84303..b916209 100644
--- a/build/cleaners/skyblock/profiles.js
+++ b/build/cleaners/skyblock/profiles.js
@@ -20,7 +20,7 @@ async function cleanSkyblockProfilesResponse(data) {
// let cleanedProfile = await cleanSkyblockProfileResponseLighter(profile)
promises.push(profile_1.cleanSkyblockProfileResponse(profile));
}
- const cleanedProfiles = await Promise.all(promises);
+ const cleanedProfiles = (await Promise.all(promises)).filter(p => p);
return cleanedProfiles;
}
exports.cleanSkyblockProfilesResponse = cleanSkyblockProfilesResponse;