small fix to return undefined when item is not found

This commit is contained in:
2016-08-08 16:03:58 +02:00
parent f6c03275f4
commit 5d06e6e78f
2 changed files with 6 additions and 1 deletions

View File

@ -59,6 +59,8 @@ export class Objectmap {
let resultArray = this.objectArray.filter(findFunction);
if (resultArray.length > 0){
return resultArray[0];
} else {
return undefined;
};
}