forest-express
Advanced tools
Comparing version 8.7.6 to 8.7.7
@@ -172,2 +172,10 @@ "use strict"; | ||
var setHasManyToEmptyArray = function setHasManyToEmptyArray(record) { | ||
schema.fields.forEach(function (field) { | ||
if (!record[field.field] && _.isArray(field.type) && field.reference) { | ||
record[field.field] = []; | ||
} | ||
}); | ||
}; | ||
return new P(function (resolve) { | ||
@@ -177,2 +185,3 @@ if (_.isArray(records)) { | ||
resolve(P.map(records, function (record) { | ||
setHasManyToEmptyArray(record); | ||
smartFieldsValuesInjector = new SmartFieldsValuesInjector(record, modelName, fieldsPerModel); | ||
@@ -188,2 +197,3 @@ return smartFieldsValuesInjector.perform(); | ||
} else { | ||
setHasManyToEmptyArray(records); | ||
resolve(new SmartFieldsValuesInjector(records, modelName, fieldsPerModel).perform()); | ||
@@ -190,0 +200,0 @@ } |
{ | ||
"name": "forest-express", | ||
"description": "Official package for all Forest Express Lianas", | ||
"version": "8.7.6", | ||
"version": "8.7.7", | ||
"author": "Sandro Munda <sandro@munda.me>", | ||
@@ -6,0 +6,0 @@ "contributors": [ |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
796712
16230