react-chessboard-ui 2.0.0 → 2.1.0

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.
@@ -642,6 +642,7 @@ JSChessEngine.checkPossibleCastling = function (state, kingPos, castlingPath, re
642
642
  });
643
643
  if (castlinPathWithFigures.length > 0) return false;
644
644
  var isPossibleCastling = true;
645
+ if (castlingPathWithoutRook.length > 2) castlingPathWithoutRook.pop();
645
646
  for (var i = 0; i < allAttackedPositionsByEnemys.length; i++) {
646
647
  var attackedPos = allAttackedPositionsByEnemys[i];
647
648
  for (var j = 0; j < castlingPathWithoutRook.length; j++) {