aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--build/mojang.js2
-rw-r--r--src/mojang.ts2
2 files changed, 4 insertions, 0 deletions
diff --git a/build/mojang.js b/build/mojang.js
index 1c301da..b740c5a 100644
--- a/build/mojang.js
+++ b/build/mojang.js
@@ -87,6 +87,8 @@ async function profileFromUsernameAlternative(username) {
catch {
return { uuid: null, username: null };
}
+ if (!data.uuid)
+ return { uuid: null, username: null };
return {
uuid: util_1.undashUuid(data.uuid),
username: data.username
diff --git a/src/mojang.ts b/src/mojang.ts
index 4d07436..dd5c6bb 100644
--- a/src/mojang.ts
+++ b/src/mojang.ts
@@ -104,6 +104,8 @@ export async function profileFromUsernameAlternative(username: string): Promise<
} catch {
return { uuid: null, username: null }
}
+ if (!data.uuid)
+ return { uuid: null, username: null }
return {
uuid: undashUuid(data.uuid),
username: data.username