wingbot-mongodb 4.1.1 → 4.1.2

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": "wingbot-mongodb",
3
- "version": "4.1.1",
3
+ "version": "4.1.2",
4
4
  "description": "MongoDB storage for wingbot.ai",
5
5
  "main": "src/main.js",
6
6
  "scripts": {
@@ -466,7 +466,11 @@ class BaseStorage {
466
466
  return entries.reduce((o, key) => {
467
467
  let val = object[key];
468
468
  if (val !== null && typeof val === 'object') {
469
- val = objectClone(val);
469
+ try {
470
+ val = objectClone(val);
471
+ } catch (e) {
472
+ val = JSON.parse(JSON.stringify(val, signReplacer));
473
+ }
470
474
  }
471
475
  return Object.assign(o, { [key]: val });
472
476
  }, {});