In the absence of fen and pgn props, chessdiagram should simply draw a blank board, or otherwise accept an array of piece@square values via the pieces prop.
However, internal movelist is being populated in the constructor (via the getFensFromPgn() function).
proposed fix (chessdiagram.js, starting line 38):
// If FEN is present, and it is an array, use it for moves
// If FEN is present, and it is a string, make it the first element of the moves array.
// If FEN is NOT present, and PGN is present, call getFensFromPgn() to generate an array of FENs
// If FEN is NOT present, and PGN is NOT present, make first element of moves array an empty string
const moves = props.fen ?
Array.isArray(props.fen) ? props.fen : [props.fen]
: props.pgn ? props.getFensFromPgn(props.pgn) : '';
// If there is a PGN, set currentMove to this.startMove, otherwise zero.
const currentMove = props.pgn ? this.startMove : 0;
In the absence of fen and pgn props, chessdiagram should simply draw a blank board, or otherwise accept an array of piece@square values via the pieces prop.
However, internal movelist is being populated in the constructor (via the getFensFromPgn() function).
proposed fix (chessdiagram.js, starting line 38):