cosa 7.1.2 → 7.1.3
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/model.js +2 -2
- package/package.json +3 -3
package/lib/model.js
CHANGED
|
@@ -145,7 +145,7 @@ const _create = (data, definition) => {
|
|
|
145
145
|
} catch (e) {
|
|
146
146
|
let error = e;
|
|
147
147
|
if ((error.code === 11000 || error.message.startsWith('E11000 duplicate key')) && context.transformDuplicateKeyError) {
|
|
148
|
-
error = context.transformDuplicateKeyError(error);
|
|
148
|
+
error = context.transformDuplicateKeyError.apply(obj, [error]);
|
|
149
149
|
}
|
|
150
150
|
throw error;
|
|
151
151
|
}
|
|
@@ -165,7 +165,7 @@ const _create = (data, definition) => {
|
|
|
165
165
|
} catch (e) {
|
|
166
166
|
let error = e;
|
|
167
167
|
if ((error.code === 11000 || error.message.startsWith('E11000 duplicate key')) && context.transformDuplicateKeyError) {
|
|
168
|
-
error = context.transformDuplicateKeyError(error);
|
|
168
|
+
error = context.transformDuplicateKeyError.apply(obj, [error]);
|
|
169
169
|
}
|
|
170
170
|
throw error;
|
|
171
171
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cosa",
|
|
3
|
-
"version": "7.1.
|
|
3
|
+
"version": "7.1.3",
|
|
4
4
|
"description": "Cosa Models for MongoDB",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"engines": {
|
|
@@ -48,8 +48,8 @@
|
|
|
48
48
|
"devDependencies": {
|
|
49
49
|
"@losant/eslint-config-losant": "^1.6.1",
|
|
50
50
|
"husky": "^8.0.3",
|
|
51
|
-
"lint-staged": "~
|
|
52
|
-
"chai": "^4.3.
|
|
51
|
+
"lint-staged": "~15.0.2",
|
|
52
|
+
"chai": "^4.3.10",
|
|
53
53
|
"chai-as-promised": "^7.1.1",
|
|
54
54
|
"chai-datetime": "^1.8.0",
|
|
55
55
|
"documentation": "^14.0.2",
|