Skip to content

Commit

Permalink
fix: piece disappear when move cor
Browse files Browse the repository at this point in the history
  • Loading branch information
noyyyy committed Nov 26, 2023
1 parent 1728987 commit 7d0004b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/client/src/ui/Chessboard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,11 @@ const Chessboard = ({ setAcHeroFn }: { setAcHeroFn: (any) => void }) => {
return;
}
const index = (e as any).srcElement.dataset.index;

if (index === undefined) {
return;
}

const [x, y] = convertToPos(index);

if (x > 3) {
Expand Down

0 comments on commit 7d0004b

Please sign in to comment.