From b69726c8a1d59a1f1bcb891fb943f7252b31044c Mon Sep 17 00:00:00 2001 From: mat Date: Thu, 3 Jun 2021 15:05:28 -0500 Subject: return null if fetchMemberProfile user uuid is null --- src/hypixel.ts | 3 ++- src/mojang.ts | 5 ++--- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/hypixel.ts b/src/hypixel.ts index f8041f5..bfb826e 100644 --- a/src/hypixel.ts +++ b/src/hypixel.ts @@ -147,8 +147,9 @@ export async function fetchMemberProfile(user: string, profile: string, customiz const websiteAccountPromise = customization ? 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) diff --git a/src/mojang.ts b/src/mojang.ts index 055809a..4d07436 100644 --- a/src/mojang.ts +++ b/src/mojang.ts @@ -75,9 +75,8 @@ export async function profileFromUsername(username: string): Promise