aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormat <github@matdoes.dev>2021-06-24 17:27:20 -0500
committermat <github@matdoes.dev>2021-06-24 17:27:20 -0500
commit2047be523ce678def4d015a0186dd54cede5ca19 (patch)
treed17a38c815f72e499c6508394317ea398aa96b9e /src
parent0e2ee00b2fce07d00eb10ee6936b6ee3e4d848f5 (diff)
downloadskyblock-api-2047be523ce678def4d015a0186dd54cede5ca19.tar.gz
skyblock-api-2047be523ce678def4d015a0186dd54cede5ca19.tar.bz2
skyblock-api-2047be523ce678def4d015a0186dd54cede5ca19.zip
actually error like it's supposed to for invalid player profiles
Diffstat (limited to 'src')
-rw-r--r--src/hypixel.ts1
1 files changed, 1 insertions, 0 deletions
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)