diff --git a/src/video-grid/model.ts b/src/video-grid/model.ts index 6ca352e2..b2d79840 100644 --- a/src/video-grid/model.ts +++ b/src/video-grid/model.ts @@ -266,7 +266,7 @@ export function tryMoveTile(g: Grid, from: number, to: number): Grid { const tile = g.cells[from]!; if ( - to > 0 && + to >= 0 && to < g.cells.length && column(to, g) <= g.columns - tile.columns ) {