Skip to content

Commit b2fa019

Browse files
MKirovaMKirova
authored andcommitted
chore(*): Check if there is record first.
1 parent b7caeac commit b2fa019

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4035,7 +4035,7 @@ export class IgxGridBaseDirective extends DisplayDensityBase implements
40354035
*/
40364036
public pinRow(rowID, index?): boolean {
40374037
const rec = this.gridAPI.get_rec_by_id(rowID);
4038-
if (this.pinnedRecords.indexOf(rec) !== -1 || !rec || this.data.indexOf(rec) === -1) {
4038+
if (!rec || this.pinnedRecords.indexOf(rec) !== -1 || this.data.indexOf(rec) === -1) {
40394039
return false;
40404040
}
40414041
const row = this.gridAPI.get_row_by_key(rowID);

0 commit comments

Comments
 (0)