adapt-authoring-content 1.2.0 → 1.2.1
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/lib/ContentModule.js +2 -2
- package/package.json +1 -1
package/lib/ContentModule.js
CHANGED
|
@@ -248,7 +248,7 @@ class ContentModule extends AbstractApiModule {
|
|
|
248
248
|
throw this.app.errors.NOT_FOUND
|
|
249
249
|
.setData({ type: originalDoc?._type, id: _id })
|
|
250
250
|
}
|
|
251
|
-
if (options.invokePreHook) await this.preCloneHook.invoke(originalDoc)
|
|
251
|
+
if (options.invokePreHook !== false) await this.preCloneHook.invoke(originalDoc)
|
|
252
252
|
|
|
253
253
|
const [parent] = _parentId ? await this.find({ _id: _parentId }) : []
|
|
254
254
|
|
|
@@ -281,7 +281,7 @@ class ContentModule extends AbstractApiModule {
|
|
|
281
281
|
for (let i = 0; i < children.length; i++) {
|
|
282
282
|
await this.clone(userId, children[i]._id, newData._id)
|
|
283
283
|
}
|
|
284
|
-
if (options.invokePostHook) await this.postCloneHook.invoke(originalDoc, newData)
|
|
284
|
+
if (options.invokePostHook !== false) await this.postCloneHook.invoke(originalDoc, newData)
|
|
285
285
|
|
|
286
286
|
return newData
|
|
287
287
|
}
|