Skip to content

Commit 64ea54d

Browse files
committed
chore(*): Simplifies statements
1 parent 4f6c858 commit 64ea54d

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

projects/igniteui-angular/src/lib/grids/grid-base.directive.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2998,8 +2998,7 @@ export class IgxGridBaseDirective extends DisplayDensityBase implements
29982998
* @internal
29992999
*/
30003000
public setFilteredSortedData(data, pinned: boolean) {
3001-
if (data === undefined) { data = []; }
3002-
data = data.map(rec => rec.ghostRecord !== undefined ? rec.recordRef : rec);
3001+
data = data ? data.map(rec => rec.ghostRecord !== undefined ? rec.recordRef : rec) : [];
30033002
if (this._pinnedRecordIDs.length > 0 && pinned) {
30043003
this._filteredSortedPinnedData = data;
30053004
this.pinnedRecords = data;
@@ -5196,8 +5195,7 @@ export class IgxGridBaseDirective extends DisplayDensityBase implements
51965195
* ```
51975196
*/
51985197
get unpinnedDataView(): any[] {
5199-
return this.unpinnedRecords ? this.unpinnedRecords :
5200-
this.verticalScrollContainer.igxForOf ? this.verticalScrollContainer.igxForOf : [];
5198+
return this.unpinnedRecords ? this.unpinnedRecords : this.verticalScrollContainer.igxForOf || [];
52015199
}
52025200

52035201
/**

0 commit comments

Comments
 (0)