From 85ebae37daa1ffa9d5bf94f47b0b5a32e37c3898 Mon Sep 17 00:00:00 2001 From: biglyderv Date: Mon, 25 Nov 2024 14:14:21 -0500 Subject: [PATCH] fix username auth crash --- game.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/game.js b/game.js index 3923aa1..ac616de 100644 --- a/game.js +++ b/game.js @@ -209,7 +209,14 @@ class Game extends GameBasic { "body": f } ); - j = await j.json(); + + j = await j.text(); + + try { + j = JSON.parse(j); + } catch (err) { + j = {}; + } if (j.username == '!nobody' || !j.username) return;