diff options
-rw-r--r-- | build/hypixel.js | 2 | ||||
-rw-r--r-- | src/hypixel.ts | 1 |
2 files changed, 3 insertions, 0 deletions
diff --git a/build/hypixel.js b/build/hypixel.js index 4e9a2a2..8750170 100644 --- a/build/hypixel.js +++ b/build/hypixel.js @@ -122,6 +122,8 @@ exports.fetchUser = fetchUser; */ async function fetchMemberProfile(user, profile, customization) { const playerUuid = await cached.uuidFromUser(user); + if (!playerUuid) + return; // 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); diff --git a/src/hypixel.ts b/src/hypixel.ts index bea64fb..eb66d48 100644 --- a/src/hypixel.ts +++ b/src/hypixel.ts @@ -142,6 +142,7 @@ export async function fetchUser({ user, uuid, username }: UserAny, included: Inc */ export async function fetchMemberProfile(user: string, profile: string, customization: boolean): Promise<CleanMemberProfile> { const playerUuid = await cached.uuidFromUser(user) + if (!playerUuid) return // we don't await the promise immediately so it can load while we do other stuff const websiteAccountPromise = customization ? fetchAccount(playerUuid) : null const profileUuid = await cached.fetchProfileUuid(user, profile) |