From de94ee968b474ee523c5312251a0333c455cc413 Mon Sep 17 00:00:00 2001 From: 08draven Date: Fri, 25 Oct 2024 00:41:26 -0400 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;