Skip to content

Commit 8e17e80

Browse files
committed
update baselift, so duplicating lift action is not possible from lila
1 parent 8187536 commit 8e17e80

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "chessground",
3-
"version": "7.11.1-pstrat2.46",
3+
"version": "7.11.1-pstrat2.48",
44
"description": "playstrategy.org chess ui, forked from lichess.org",
55
"type": "commonjs",
66
"main": "chessground.js",

src/board.ts

+7
Original file line numberDiff line numberDiff line change
@@ -284,6 +284,13 @@ export function baseLift(state: HeadlessState, dest: cg.Key): boolean {
284284
} else {
285285
state.pieces.delete(dest);
286286
}
287+
state.lastMove = [dest];
288+
state.check = undefined;
289+
state.movable.dests = undefined;
290+
state.dropmode.dropDests = undefined;
291+
state.liftable.liftDests = undefined;
292+
state.animation.current = undefined;
293+
callUserFunction(state.events.change);
287294
return true;
288295
} else {
289296
return false;

0 commit comments

Comments
 (0)