Skip to content

Commit 4423cf6

Browse files
committed
Fix the undefined colours issue
1 parent 83c947b commit 4423cf6

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

src/components/GameMove.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1404,7 +1404,12 @@ function GameMove(props) {
14041404
}
14051405
}
14061406
// handle "Always use my colour" preference
1407-
if (globalMe?.settings?.all?.myColor && game.me > 0) {
1407+
if (
1408+
options.colours !== undefined &&
1409+
Array.isArray(options.colours) &&
1410+
options.colours.length > 0 &&
1411+
globalMe?.settings?.all?.myColor && game.me > 0
1412+
) {
14081413
const mycolor = options.colours.shift();
14091414
options.colours.splice(game.me, 0, mycolor);
14101415
}

0 commit comments

Comments
 (0)