react-chessboard-ui 1.4.10 → 1.4.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -176,6 +176,7 @@ JSChessEngine.checkBeatedCell = function (state, target) {
176
176
  };
177
177
  JSChessEngine.hasFigure = function (state, pos) {
178
178
  var _state$pos$1$pos$;
179
+ if (!state[pos[1]]) return false;
179
180
  return !!((_state$pos$1$pos$ = state[pos[1]][pos[0]]) !== null && _state$pos$1$pos$ !== void 0 && _state$pos$1$pos$.figure);
180
181
  };
181
182
  JSChessEngine.checkFigureIsLongRange = function (state, figurePos) {