Skip to content

Commit

Permalink
Merge pull request #335 from jfgarcia268/master
Browse files Browse the repository at this point in the history
Fix Product2 Export when they Don't have AA
  • Loading branch information
Adam Rutland authored Nov 24, 2020
2 parents 61ea19c + 575e5a7 commit 98483de
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions lib/datapacksexpand.js
Original file line number Diff line number Diff line change
Expand Up @@ -621,11 +621,12 @@ DataPacksExpand.prototype.preprocessSObjects = async function(currentData, dataP
if (field.indexOf('.') != -1) {
try {
var splitFields = field.split('.');

if (currentData[splitFields[0]]) {
if (currentData[splitFields[0]] && currentData[splitFields[0]].length > 0) {
var nestedData = { [splitFields[0]]: JSON.parse(currentData[splitFields[0]]) };
self.filterNestedField(nestedData, field);
currentData[splitFields[0]] = stringify(nestedData[splitFields[0]]);
if(nestedData && nestedData.length > 0){
self.filterNestedField(nestedData, field);
currentData[splitFields[0]] = stringify(nestedData[splitFields[0]]);
}
}
} catch (e) {
VlocityUtils.error('Failure in nested parsing', e);
Expand Down

0 comments on commit 98483de

Please sign in to comment.