diff options
author | mat <27899617+mat-1@users.noreply.github.com> | 2021-02-15 14:44:52 -0600 |
---|---|---|
committer | mat <27899617+mat-1@users.noreply.github.com> | 2021-02-15 14:44:52 -0600 |
commit | 17c9057a71b3bdd2ea458b050ed77dfb4aebe25a (patch) | |
tree | fcaf9311b722d88797ffe975d260844aecf7ac9b /src/hypixel.ts | |
parent | 839b43b1cfc0735e002211326246c058e5ec759b (diff) | |
download | skyblock-api-17c9057a71b3bdd2ea458b050ed77dfb4aebe25a.tar.gz skyblock-api-17c9057a71b3bdd2ea458b050ed77dfb4aebe25a.tar.bz2 skyblock-api-17c9057a71b3bdd2ea458b050ed77dfb4aebe25a.zip |
fix profiles for players that changed their usernames
Diffstat (limited to 'src/hypixel.ts')
-rw-r--r-- | src/hypixel.ts | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/hypixel.ts b/src/hypixel.ts index e2d0e6b..6c19a69 100644 --- a/src/hypixel.ts +++ b/src/hypixel.ts @@ -75,7 +75,11 @@ export async function fetchUser({ user, uuid, username }: UserAny, included: Inc if (!uuid) { // If the uuid isn't provided, get it uuid = await cached.uuidFromUser(user || username) - } + } + if (!uuid) { + // the user doesn't exist. + return null + } const includePlayers = included.includes('player') const includeProfiles = included.includes('profiles') |