brackets-memory-db 1.0.2 → 1.0.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.
Files changed (2) hide show
  1. package/dist/index.js +2 -1
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -141,7 +141,8 @@ class InMemoryDatabase {
141
141
  values.forEach((v) => {
142
142
  const existing = this.data[table][v.id];
143
143
  for (const key in value) {
144
- if (typeof value[key] === 'object') {
144
+ // @ts-ignore
145
+ if (existing[key] && typeof existing[key] === 'object' && typeof value[key] === 'object') {
145
146
  // @ts-ignore
146
147
  Object.assign(existing[key], value[key]); // For opponent objects, this does a deep merge of level 2.
147
148
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "brackets-memory-db",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
4
4
  "description": "An in-memory database for brackets-manager.js",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",