Skip to content

Commit a02d935

Browse files
committed
fix(material/grid-list): always validate colspan
We were dropping the `colspan` validation error in production mode which meant that it can go into an infinite loop.
1 parent 0939437 commit a02d935

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

src/material/grid-list/tile-coordinator.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,10 +94,9 @@ export class TileCoordinator {
9494

9595
/** Finds the next available space large enough to fit the tile. */
9696
private _findMatchingGap(tileCols: number): number {
97-
if (tileCols > this.tracker.length && (typeof ngDevMode === 'undefined' || ngDevMode)) {
97+
if (tileCols > this.tracker.length) {
9898
throw Error(
99-
`mat-grid-list: tile with colspan ${tileCols} is wider than ` +
100-
`grid with cols="${this.tracker.length}".`,
99+
`mat-grid-list: tile with colspan ${tileCols} is wider than grid with cols="${this.tracker.length}".`,
101100
);
102101
}
103102

0 commit comments

Comments
 (0)