Skip to content

Commit

Permalink
Merge pull request #435 from jfgarcia268/master
Browse files Browse the repository at this point in the history
Fix findMatchingLookupRecordSourceKey  returning undefined VlocityLoo…
  • Loading branch information
Adam Rutland authored Jan 25, 2022
2 parents 540a8c4 + a3256c0 commit b0ca2ed
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions lib/datapackserrorhandling.js
Original file line number Diff line number Diff line change
Expand Up @@ -404,21 +404,21 @@ DataPacksErrorHandling.prototype.findMatchingLookupRecordSourceKey = function(da
for (var i = 0; i < searchPathMap.searchPath.length; i++) {
if (dataPack.hasOwnProperty(searchPathMap.searchPath[i])) {
var nodeVal = dataPack[searchPathMap.searchPath[i]];

if (searchPathMap.compareValues) {
var match = 0;
for (var z = 0; z < searchPathMap.compareValues.length; z++) {
var allMatch = true;
for (var key in searchPathMap.compareValues[z]) {
if (nodeVal.hasOwnProperty(key)) {
if (nodeVal[key] !== searchPathMap.compareValues[z][key]) {
allMatch = false;
if (nodeVal[key] === searchPathMap.compareValues[z][key]) {
match++;
//return nodeVal.VlocityLookupRecordSourceKey;
}
}
}
if(allMatch){
return nodeVal.VlocityLookupRecordSourceKey;
}

}
if(match == searchPathMap.compareValues.length){
return nodeVal.VlocityLookupRecordSourceKey;
}
}

Expand Down

0 comments on commit b0ca2ed

Please sign in to comment.