diff --git a/src/cdk/table/table.ts b/src/cdk/table/table.ts index cdf500bba50f..68ff590276fd 100644 --- a/src/cdk/table/table.ts +++ b/src/cdk/table/table.ts @@ -177,7 +177,7 @@ export class CdkTable implements CollectionViewer { } ngAfterContentInit() { - if (!this._headerDef && this._rowDefs.length == 0) { + if (!this._headerDef && !this._rowDefs.length) { throw getTableMissingRowDefsError(); }