diff --git a/ui/keyboardMove/src/plugins/util.ts b/ui/keyboardMove/src/plugins/util.ts index 78c1361724c17..7f3bc2eba480d 100644 --- a/ui/keyboardMove/src/plugins/util.ts +++ b/ui/keyboardMove/src/plugins/util.ts @@ -82,7 +82,7 @@ export function regexMatchAllSquares(str: string): Square[] { let match; while ((match = keyR.exec(str)) !== null) { const sq = toSquare(match[0]); - if (sq) matches.push(sq); + if (sq !== undefined) matches.push(sq); } return matches; }