diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/mojang.ts | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/mojang.ts b/src/mojang.ts index 17918b1..473f9c3 100644 --- a/src/mojang.ts +++ b/src/mojang.ts @@ -68,11 +68,12 @@ export async function profileFromUsername(username: string): Promise<MojangApiRe } let data + const rawData = await fetchResponse.text() try { - data = await fetchResponse.json() + data = JSON.parse(rawData) } catch {} - console.log('mojang returned', data) + console.log('mojang returned', rawData) if (!data?.id) { console.log('mojang api failed, trying ashcon as backup') |