drapcode-utility 1.8.3 → 1.8.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -79,6 +79,10 @@ var checkForError = function (result, errors, mapping, status) { return __awaite
|
|
|
79
79
|
}
|
|
80
80
|
console.log("finalErrors", finalErrors);
|
|
81
81
|
if (finalErrors.length > 0) {
|
|
82
|
+
finalErrors = Array.from(new Map(finalErrors.map(function (err) { return [
|
|
83
|
+
"".concat(Number(err.status), "|").concat(err.message),
|
|
84
|
+
{ status: Number(err.status), message: err.message },
|
|
85
|
+
]; })).values());
|
|
82
86
|
finalFinalStatus_1 = 400;
|
|
83
87
|
finalMessage = "";
|
|
84
88
|
console.log("finalMessage", finalMessage);
|
package/build/utils/util.js
CHANGED
|
@@ -629,7 +629,7 @@ var validateData = function (fields, data) {
|
|
|
629
629
|
fieldValue.length <= 0) {
|
|
630
630
|
return;
|
|
631
631
|
}
|
|
632
|
-
var fieldTitle = field.fieldTitle.get("en");
|
|
632
|
+
var fieldTitle = field.fieldTitle.en || field.fieldTitle.get("en");
|
|
633
633
|
if (field.type === "file" && typeof fieldValue === "string") {
|
|
634
634
|
try {
|
|
635
635
|
fieldValue = JSON.parse(fieldValue);
|