@herdwatch/lokijs 1.5.12-dev.4 → 1.5.12-dev.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@herdwatch/lokijs",
3
- "version": "1.5.12-dev.4",
3
+ "version": "1.5.12-dev.5",
4
4
  "description": "Fast document oriented javascript in-memory database",
5
5
  "homepage": "https://techfort.github.io/LokiJS/",
6
6
  "types": "index.d.ts",
@@ -351,7 +351,9 @@
351
351
  // save collection metadata as separate chunk (but only if changed)
352
352
  if (collection.dirty || dirtyChunks.size || !incremental) {
353
353
  collection.idIndex = []; // this is recreated lazily
354
- collection.data = [];
354
+ if(!this.getData){
355
+ collection.data = [];
356
+ }
355
357
  collection.idbVersionId = randomVersionId();
356
358
  collectionVersionIds.push({ name: collection.name, versionId: collection.idbVersionId });
357
359