@herdwatch/lokijs 1.5.12-dev.3 → 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
|
@@ -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
|
-
|
|
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
|
|
package/src/lokijs.js
CHANGED
|
@@ -1785,7 +1785,6 @@
|
|
|
1785
1785
|
}
|
|
1786
1786
|
copyColl.getData = coll.getData;
|
|
1787
1787
|
Object.defineProperty(copyColl, 'data', {
|
|
1788
|
-
writable: true,
|
|
1789
1788
|
/* jshint loopfunc:true */
|
|
1790
1789
|
get: function() {
|
|
1791
1790
|
var data = this.getData();
|
|
@@ -6018,7 +6017,9 @@
|
|
|
6018
6017
|
|
|
6019
6018
|
options = options || {};
|
|
6020
6019
|
|
|
6021
|
-
this.
|
|
6020
|
+
if(!this.getData){
|
|
6021
|
+
this.data = [];
|
|
6022
|
+
}
|
|
6022
6023
|
this.idIndex = null;
|
|
6023
6024
|
this.cachedIndex = null;
|
|
6024
6025
|
this.cachedBinaryIndex = null;
|