Quick backend patch

This commit is contained in:
Sage Vaillancourt 2022-10-19 00:56:10 +00:00
parent 6bdee0edc4
commit eeff3c226f
1 changed files with 2 additions and 2 deletions

View File

@ -102,8 +102,8 @@ const startingBoard = () => {
} }
const textFromBoard = ({ state }) => { const textFromBoard = ({ state }) => {
const turn = (this.state.blackIsNext? 'B' : 'W'); const turn = state?.blackIsNext ? 'B' : 'W';
return turn + this.state.squares.map(square => { return turn + state?.squares.map(square => {
if (!square) { if (!square) {
return '_'; return '_';
} }