Skip to content

Commit 77dc83c

Browse files
committed
chore(*): Fixes errors when data is undefined
1 parent f197f18 commit 77dc83c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2998,6 +2998,7 @@ export class IgxGridBaseDirective extends DisplayDensityBase implements
29982998
* @internal
29992999
*/
30003000
public setFilteredSortedData(data, pinned: boolean) {
3001+
if (data === undefined) { data = []; }
30013002
data = data.map(rec => rec.ghostRecord !== undefined ? rec.recordRef : rec);
30023003
if (this._pinnedRecordIDs.length > 0 && pinned) {
30033004
this._filteredSortedPinnedData = data;
@@ -5195,7 +5196,8 @@ export class IgxGridBaseDirective extends DisplayDensityBase implements
51955196
* ```
51965197
*/
51975198
get unpinnedDataView(): any[] {
5198-
return this.unpinnedRecords ? this.unpinnedRecords : this.verticalScrollContainer.igxForOf;
5199+
return this.unpinnedRecords ? this.unpinnedRecords :
5200+
this.verticalScrollContainer.igxForOf ? this.verticalScrollContainer.igxForOf : [];
51995201
}
52005202

52015203
/**

0 commit comments

Comments
 (0)