aboutsummaryrefslogtreecommitdiff
path: root/build/hypixel.js
diff options
context:
space:
mode:
Diffstat (limited to 'build/hypixel.js')
-rw-r--r--build/hypixel.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/build/hypixel.js b/build/hypixel.js
index b00774d..4e9a2a2 100644
--- a/build/hypixel.js
+++ b/build/hypixel.js
@@ -125,9 +125,11 @@ async function fetchMemberProfile(user, profile, customization) {
// we don't await the promise immediately so it can load while we do other stuff
const websiteAccountPromise = customization ? database_1.fetchAccount(playerUuid) : null;
const profileUuid = await cached.fetchProfileUuid(user, profile);
- // if the profile doesn't have an id, just return
+ // if the profile or player doesn't have an id, just return
if (!profileUuid)
return null;
+ if (!playerUuid)
+ return null;
const player = await cached.fetchPlayer(playerUuid);
const cleanProfile = await cached.fetchProfile(playerUuid, profileUuid);
const member = cleanProfile.members.find(m => m.uuid === playerUuid);