@telestack/db-sdk 1.0.4 → 1.0.5

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 -2
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -452,7 +452,7 @@ export class Query {
452
452
  callback(docs);
453
453
  }
454
454
  else {
455
- this.docsCache = [...this.docsCache.filter(d => d.id !== docId), { id: docId, ...event.doc.data }];
455
+ this.docsCache = [...this.docsCache.filter(d => d.id !== docId), { id: docId, data: event.doc.data }];
456
456
  changed = true;
457
457
  }
458
458
  }
@@ -466,7 +466,7 @@ export class Query {
466
466
  callback(docs);
467
467
  }
468
468
  else if (matches) {
469
- this.docsCache = this.docsCache.map(d => d.id === docId ? { ...d, ...docData } : d);
469
+ this.docsCache = this.docsCache.map(d => d.id === docId ? { ...d, data: { ...d.data, ...docData } } : d);
470
470
  changed = true;
471
471
  }
472
472
  else {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@telestack/db-sdk",
3
- "version": "1.0.4",
3
+ "version": "1.0.5",
4
4
  "description": "Fluent, real-time SDK for Telestack DB",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",