Closed jniemann66 closed 7 years ago
In chessdiagram.js, the introduction 'allowMoves' was a good idea. However, there should be an additional safeguard against the case where allowMoves is true, but onMovePiece is undefined.
I propose the following change to Chessdiagram.js, line 64:
_onMovePiece(pieceType, from, to) { if (this.props.allowMoves && this.props.onMovePiece) { this.props.onMovePiece(pieceType, from, to); } }
fixed in f4e480c2617658e353c162f1cb8e67a0ffa98a14
In chessdiagram.js, the introduction 'allowMoves' was a good idea. However, there should be an additional safeguard against the case where allowMoves is true, but onMovePiece is undefined.
I propose the following change to Chessdiagram.js, line 64: