@onlineapps/conn-orch-api-mapper 1.0.6 → 1.0.7
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.
- package/package.json +1 -1
- package/src/ApiMapper.js +3 -3
package/package.json
CHANGED
package/src/ApiMapper.js
CHANGED
|
@@ -175,9 +175,9 @@ class ApiMapper {
|
|
|
175
175
|
try {
|
|
176
176
|
const accessor = getContentAccessor();
|
|
177
177
|
|
|
178
|
-
// If field is already a Descriptor (has
|
|
179
|
-
if (typeof fieldValue === 'object' && fieldValue !== null && (fieldValue.type === 'file' || fieldValue.type === 'inline')) {
|
|
180
|
-
// Already a Descriptor, normalize to ensure completeness
|
|
178
|
+
// If field is already a Descriptor (has _descriptor flag), use as-is
|
|
179
|
+
if (typeof fieldValue === 'object' && fieldValue !== null && (fieldValue._descriptor === true || fieldValue.type === 'file' || fieldValue.type === 'inline')) {
|
|
180
|
+
// Already a Descriptor, normalize to ensure completeness and _descriptor flag
|
|
181
181
|
normalizedOutput[fieldName] = await accessor.normalizeToDescriptor(fieldValue, {
|
|
182
182
|
filename: fieldValue.filename,
|
|
183
183
|
content_type: fieldValue.content_type
|