aboutsummaryrefslogtreecommitdiff
path: root/build/cleaners/skyblock/profiles.js
diff options
context:
space:
mode:
Diffstat (limited to 'build/cleaners/skyblock/profiles.js')
-rw-r--r--build/cleaners/skyblock/profiles.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/build/cleaners/skyblock/profiles.js b/build/cleaners/skyblock/profiles.js
index b79fc56..1996d55 100644
--- a/build/cleaners/skyblock/profiles.js
+++ b/build/cleaners/skyblock/profiles.js
@@ -4,7 +4,7 @@ exports.cleanSkyblockProfilesResponse = exports.cleanPlayerSkyblockProfiles = vo
const profile_1 = require("./profile");
function cleanPlayerSkyblockProfiles(rawProfiles) {
let profiles = [];
- for (const profile of Object.values(rawProfiles)) {
+ for (const profile of Object.values(rawProfiles !== null && rawProfiles !== void 0 ? rawProfiles : {})) {
profiles.push({
uuid: profile.profile_id,
name: profile.cute_name
@@ -17,7 +17,7 @@ exports.cleanPlayerSkyblockProfiles = cleanPlayerSkyblockProfiles;
/** Convert an array of raw profiles into clean profiles */
async function cleanSkyblockProfilesResponse(data) {
const cleanedProfiles = [];
- for (const profile of data) {
+ for (const profile of data !== null && data !== void 0 ? data : []) {
let cleanedProfile = await profile_1.cleanSkyblockProfileResponseLighter(profile);
cleanedProfiles.push(cleanedProfile);
}