From 93c2e77094079f269d1e170bea5d367011737b62 Mon Sep 17 00:00:00 2001 From: Dragon Fire Date: Sat, 23 Jan 2021 18:51:24 -0500 Subject: [PATCH] Fix --- commands/games-mp/chess.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/commands/games-mp/chess.js b/commands/games-mp/chess.js index 9ab1f0fe..7d40b798 100644 --- a/commands/games-mp/chess.js +++ b/commands/games-mp/chess.js @@ -134,7 +134,7 @@ module.exports = class ChessCommand extends Command { const prevGamePiece = prevGameState ? prevGameState.pieces[`${cols[col]}${row}`] : null; if (piece) { const parsed = this.pickImage(piece); - if (piece !== prevGamePiece) { + if (prevGameState && piece !== prevGamePiece) { drawImageWithTint(ctx, this.images[parsed.color][parsed.name], 'green', w, h, 52, 52); } else { ctx.drawImage(this.images[parsed.color][parsed.name], w, h, 52, 52);