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.
@@ -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
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "adapt-authoring-content",
3
- "version": "1.2.0",
3
+ "version": "1.2.1",
4
4
  "description": "Module for managing Adapt content",
5
5
  "homepage": "https://github.com/adapt-security/adapt-authoring-content",
6
6
  "license": "GPL-3.0",