From eeff3c226f9b760fad26f85e16f2b3f5fcbe6de7 Mon Sep 17 00:00:00 2001 From: Sage Vaillancourt Date: Wed, 19 Oct 2022 00:56:10 +0000 Subject: [PATCH] Quick backend patch --- src/logic.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/logic.js b/src/logic.js index ee9637f..6e6f181 100644 --- a/src/logic.js +++ b/src/logic.js @@ -102,8 +102,8 @@ const startingBoard = () => { } const textFromBoard = ({ state }) => { - const turn = (this.state.blackIsNext? 'B' : 'W'); - return turn + this.state.squares.map(square => { + const turn = state?.blackIsNext ? 'B' : 'W'; + return turn + state?.squares.map(square => { if (!square) { return '_'; }