File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
projects/igniteui-angular/src/lib/grids/tree-grid Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -661,8 +661,8 @@ export class IgxTreeGridComponent extends IgxGridBaseDirective implements GridTy
661
661
* @param index
662
662
*/
663
663
public getRowByKey ( key : any ) : RowType {
664
- const rec = this . primaryKey ? this . filteredSortedData . find ( r => r [ this . primaryKey ] === key ) :
665
- this . filteredSortedData . find ( r => r === key ) ;
664
+ const rec = this . filteredSortedData ? this . primaryKey ? this . filteredSortedData . find ( r => r [ this . primaryKey ] === key ) :
665
+ this . filteredSortedData . find ( r => r === key ) : undefined ;
666
666
const index = this . dataView . findIndex ( r => r . data && r . data === rec ) ;
667
667
if ( index < 0 || index >= this . filteredSortedData . length ) {
668
668
return undefined ;
You can’t perform that action at this time.
0 commit comments