@builttocreate/engine-utils 2.10.1-beta.v593.31 → 2.10.1-beta.v593.33
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/dist/joyDocHelper.js +3 -3
- package/package.json +1 -1
package/dist/joyDocHelper.js
CHANGED
|
@@ -172,10 +172,10 @@ var getCleanedJoyDoc = exports.getCleanedJoyDoc = function getCleanedJoyDoc(doc)
|
|
|
172
172
|
var nextFile = _objectSpread({}, file);
|
|
173
173
|
|
|
174
174
|
/**
|
|
175
|
-
* Step 1.3: Replace files[x]._id if it is not valid
|
|
175
|
+
* Step 1.3: Replace files[x]._id if it is not a valid ObjectId or valid readable ID
|
|
176
176
|
*/
|
|
177
|
-
|
|
178
|
-
if (nextFile._id && (0, _validateReadableId["default"])(nextFile._id)) nextFile._id =
|
|
177
|
+
|
|
178
|
+
if (nextFile._id && !(0, _validateObjectId["default"])(nextFile._id) && !(0, _validateReadableId["default"])(nextFile._id)) nextFile._id = (0, _generateObjectId["default"])();
|
|
179
179
|
|
|
180
180
|
/**
|
|
181
181
|
* Step 1.4: Replace page ids and field ids if they are not valid
|