gemcap-be-common 1.3.17 → 1.3.18

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.
@@ -20,7 +20,7 @@ const deepCloneAndConvertMaps = (obj) => {
20
20
  if (obj instanceof Date) {
21
21
  return new Date(obj.getTime());
22
22
  }
23
- if (mongoose_1.default.isValidObjectId(obj)) {
23
+ if (obj instanceof mongoose_1.default.Types.ObjectId) {
24
24
  return obj.toString();
25
25
  }
26
26
  if (typeof obj === 'object' && obj !== null) {
@@ -19,7 +19,7 @@ const deepCloneAndConvertMaps = <T>(obj: T): T => {
19
19
  if (obj instanceof Date) {
20
20
  return new Date(obj.getTime()) as T;
21
21
  }
22
- if (mongoose.isValidObjectId(obj)) {
22
+ if (obj instanceof mongoose.Types.ObjectId) {
23
23
  return obj.toString() as T;
24
24
  }
25
25
  if (typeof obj === 'object' && obj !== null) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gemcap-be-common",
3
- "version": "1.3.17",
3
+ "version": "1.3.18",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {