From f5d72c01e5607fd32c885760de55b0e4c5cbcb5a Mon Sep 17 00:00:00 2001 From: onezDerv Date: Wed, 2 Oct 2024 04:18:43 -0400 Subject: [PATCH] bugfix again --- static/js/index.js | 1 + 1 file changed, 1 insertion(+) diff --git a/static/js/index.js b/static/js/index.js index 7df1a38..e47480c 100644 --- a/static/js/index.js +++ b/static/js/index.js @@ -122,6 +122,7 @@ class Game extends GameBasic { let { player } = this; if (player.health <= 0) { + let that = this; this.ws.close(); this.ws = new WebSocket(origin); this.ws.addEventListener('message', function (e) { that.recv(e) });