We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 18336a2 commit 20342abCopy full SHA for 20342ab
1 file changed
src/client/scripts/index.js
@@ -100,10 +100,15 @@ class Game {
100
this.chat.log(msg);
101
});
102
this.socket.on("kicked", (reason) => {
103
+ document.exitPointerLock();
104
console.log(reason);
105
+ reason = JSON.parse(reason);
106
swal({
107
title: "You've been kicked!",
- text: JSON.parse(reason).extra[0].text,
108
+ text:
109
+ reason.extra !== undefined
110
+ ? reason.extra[0].text
111
+ : reason.text,
112
icon: "error",
113
button: "Rejoin",
114
}).then(function () {
0 commit comments