Don't try to promote the same speaker multiple times

This commit is contained in:
Robin Townsend 2023-06-18 11:45:01 -04:00
parent ddeb36db47
commit cd7ab00d80

View File

@ -690,8 +690,13 @@ export function promoteSpeakers(g: Grid) {
for (let j = 0; j < 10; j++) {
const to = Math.floor(Math.random() * firstPageEnd);
const toCell = g.cells[to];
if (toCell === undefined || (toCell.columns === 1 && toCell.rows === 1))
if (
toCell === undefined ||
(toCell.columns === 1 && toCell.rows === 1)
) {
moveTile(g, from, to);
break;
}
}
}
}