next-chessground 1.0.0 → 1.0.1

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.es.js CHANGED
@@ -5670,7 +5670,8 @@ const Chessboard = (props, ref) => {
5670
5670
  } = useChess(props);
5671
5671
  const handleMove = async (from, to) => {
5672
5672
  const move = onMove(from, to, promotion);
5673
- if (!move) {
5673
+ // Show promotion modal only when the move is not an undo
5674
+ if (!move && !props.isUndo) {
5674
5675
  show();
5675
5676
  return false;
5676
5677
  }
package/dist/index.js CHANGED
@@ -5679,7 +5679,8 @@ const Chessboard = (props, ref) => {
5679
5679
  } = useChess(props);
5680
5680
  const handleMove = async (from, to) => {
5681
5681
  const move = onMove(from, to, promotion);
5682
- if (!move) {
5682
+ // Show promotion modal only when the move is not an undo
5683
+ if (!move && !props.isUndo) {
5683
5684
  show();
5684
5685
  return false;
5685
5686
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "next-chessground",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "React and Next wrapper for Chessground with chessboard and pieces out of the box",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.es.js",