Add check for undefined object in extractNames
This commit is contained in:
parent
83d0c41c5a
commit
82c8741b6e
|
@ -301,6 +301,7 @@ export class TableComponent implements OnInit, OnDestroy {
|
|||
}
|
||||
|
||||
extractNamesFromObject(obj: any) {
|
||||
if(typeof obj === 'undefined') return "";
|
||||
return obj.flatMap((e: any) => {
|
||||
if(e.surname === null) return e.name;
|
||||
return e.surname+" "+e.name;
|
||||
|
|
Loading…
Reference in New Issue