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 +2 -1
- package/dist/index.js +2 -1
- package/package.json +1 -1
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
|
-
|
|
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
|
-
|
|
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
|
}
|