@kravc/dos 1.7.0 → 1.7.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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/Document.js +4 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kravc/dos",
3
- "version": "1.7.0",
3
+ "version": "1.7.1",
4
4
  "description": "Convention-based, easy-to-use library for building API-driven serverless services.",
5
5
  "keywords": [
6
6
  "Service",
package/src/Document.js CHANGED
@@ -68,7 +68,10 @@ class Document extends Component {
68
68
  duplicate been created */
69
69
  const { document: existingDocument } = context
70
70
 
71
- if (existingDocument) {
71
+ const skipCreate =
72
+ !!existingDocument && existingDocument.constructor.name === this.name
73
+
74
+ if (skipCreate) {
72
75
  return existingDocument
73
76
  }
74
77