diff --git a/packages/client/src/ui/Chessboard.tsx b/packages/client/src/ui/Chessboard.tsx index 56b6abc..6f0667e 100644 --- a/packages/client/src/ui/Chessboard.tsx +++ b/packages/client/src/ui/Chessboard.tsx @@ -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) {