small fix to return undefined when item is not found
This commit is contained in:
@ -59,6 +59,8 @@ export class Objectmap {
|
||||
let resultArray = this.objectArray.filter(findFunction);
|
||||
if (resultArray.length > 0){
|
||||
return resultArray[0];
|
||||
} else {
|
||||
return undefined;
|
||||
};
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user