aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/mojang.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mojang.ts b/src/mojang.ts
index 331b3f3..60438e8 100644
--- a/src/mojang.ts
+++ b/src/mojang.ts
@@ -72,7 +72,7 @@ export async function profileFromUsername(username: string): Promise<MojangApiRe
data = await fetchResponse.json()
} catch {}
- if (!data.id) {
+ if (!data?.id) {
console.log('mojang api failed, trying ashcon as backup')
return await profileFromUsernameAlternative(username)
}