From 99be26f72c4e2472fdad3ca6f02f9658f71df6ce Mon Sep 17 00:00:00 2001 From: Dragon Fire Date: Sat, 23 Jan 2021 15:37:04 -0500 Subject: [PATCH] Fix --- commands/games-mp/chess.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/commands/games-mp/chess.js b/commands/games-mp/chess.js index cacc19ef..8a9c9614 100644 --- a/commands/games-mp/chess.js +++ b/commands/games-mp/chess.js @@ -129,9 +129,10 @@ module.exports = class ChessCommand extends Command { let col = 0; for (let i = 0; i < 64; i++) { const piece = gameState.pieces[`${cols[col]}${row}`]; - if (!piece) continue; - const parsed = this.pickImage(piece); - ctx.drawImage(this.images[parsed.color][parsed.name], w, h, 52, 52); + if (piece) { + const parsed = this.pickImage(piece); + ctx.drawImage(this.images[parsed.color][parsed.name], w, h, 52, 52); + } w += 52 + 2; col += 1; if (col % 8 === 0 && col !== 0) {