fix username auth crash
This commit is contained in:
parent
cfc282e496
commit
85ebae37da
1 changed files with 8 additions and 1 deletions
9
game.js
9
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;
|
||||
|
||||
|
|
Loading…
Reference in a new issue