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.
@@ -173,6 +173,7 @@ JSChessEngine.checkBeatedCell = function (state, target) {
173
173
  };
174
174
  JSChessEngine.hasFigure = function (state, pos) {
175
175
  var _state$pos$1$pos$;
176
+ if (!state[pos[1]]) return false;
176
177
  return !!((_state$pos$1$pos$ = state[pos[1]][pos[0]]) !== null && _state$pos$1$pos$ !== void 0 && _state$pos$1$pos$.figure);
177
178
  };
178
179
  JSChessEngine.checkFigureIsLongRange = function (state, figurePos) {