From 635c5d577cf34b0585ca50c12321e5dce5a8bff4 Mon Sep 17 00:00:00 2001 From: biglyderv Date: Mon, 25 Nov 2024 14:14:20 -0500 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) });