@adobe/aio-lib-db 0.1.0-beta.3 → 0.1.0-beta.4

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adobe/aio-lib-db",
3
- "version": "0.1.0-beta.3",
3
+ "version": "0.1.0-beta.4",
4
4
  "description": "An abstraction on top of Document DB storage",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -35,6 +35,10 @@ function transformBsonPrimitives(obj) {
35
35
  })
36
36
  }
37
37
  else if (typeof obj === 'object') {
38
+ // If the type was recognized by the parser, any properties should also have been handled so return it as-is
39
+ const objName = obj?.constructor?.name
40
+ if (objName && objName !== 'Object') return obj
41
+
38
42
  const mapped = {}
39
43
  Object.keys(obj).forEach((key) => {
40
44
  mapped[key] = transformBsonPrimitives(obj[key])