Skip to content

Commit 6927390

Browse files
delbertoooMarkColeman1
authored andcommitted
refactor: remove unnecessary checks
Remove check for `this._rows` as it's always defined.
1 parent db1b749 commit 6927390

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

projects/swimlane/ngx-datatable/src/lib/components/datatable.component.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ export class DatatableComponent<TRow extends Row = any>
138138
@Input() set groupRowsBy(val: keyof TRow) {
139139
if (val) {
140140
this._groupRowsBy = val;
141-
if (this._rows && this._groupRowsBy) {
141+
if (this._groupRowsBy) {
142142
// creates a new array with the data grouped
143143
this.groupedRows = this.groupArrayBy(this._rows, this._groupRowsBy);
144144
}
@@ -853,7 +853,7 @@ export class DatatableComponent<TRow extends Row = any>
853853
optionalGetterForProp(this.treeToRelation)
854854
);
855855

856-
if (this._rows && this._groupRowsBy) {
856+
if (this._groupRowsBy) {
857857
// If a column has been specified in _groupRowsBy create a new array with the data grouped by that row
858858
this.groupedRows = this.groupArrayBy(this._rows, this._groupRowsBy);
859859
}

0 commit comments

Comments
 (0)