diff options
Diffstat (limited to 'build')
-rw-r--r-- | build/mojang.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/build/mojang.js b/build/mojang.js index ef4f7fd..6180b15 100644 --- a/build/mojang.js +++ b/build/mojang.js @@ -55,11 +55,12 @@ async function profileFromUsername(username) { return await profileFromUsername(username); } 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 === null || data === void 0 ? void 0 : data.id)) { console.log('mojang api failed, trying ashcon as backup'); return await profileFromUsernameAlternative(username); |