Skip to content

Commit 1759bd5

Browse files
authored
Merge pull request #6241 from IgniteUI/mkirova/fix-6239
fix(igxGrid): Add check in case setter is called before grid is init.
2 parents c5be973 + 686aead commit 1759bd5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

projects/igniteui-angular/src/lib/grids/columns/column.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -584,7 +584,7 @@ export class IgxColumnComponent implements AfterContentInit {
584584
/* No grid/width available at initialization. `initPinning` in the grid
585585
will re-init the group (if present)
586586
*/
587-
this._unpinnedIndex = this.grid.columns.filter(x => !x.pinned).indexOf(this);
587+
this._unpinnedIndex = this.grid ? this.grid.columns.filter(x => !x.pinned).indexOf(this) : 0;
588588
this._pinned = value;
589589
this.pinnedChange.emit(this._pinned);
590590
}

0 commit comments

Comments
 (0)