@herdwatch/lokijs 1.5.12-dev.0 → 1.5.12-dev.1

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/package.json +1 -1
  2. package/src/lokijs.js +5 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@herdwatch/lokijs",
3
- "version": "1.5.12-dev.0",
3
+ "version": "1.5.12-dev.1",
4
4
  "description": "Fast document oriented javascript in-memory database",
5
5
  "homepage": "https://techfort.github.io/LokiJS/",
6
6
  "types": "index.d.ts",
package/src/lokijs.js CHANGED
@@ -2940,6 +2940,11 @@
2940
2940
  // so next step will be to implement collection level dirty flags set on insert/update/remove
2941
2941
  // along with loki level isdirty() function which iterates all collections to see if any are dirty
2942
2942
 
2943
+ // for pause autosave
2944
+ if (!self.autosave) {
2945
+ return;
2946
+ }
2947
+
2943
2948
  if (self.autosaveDirty() && !self.ignoreAutosave) {
2944
2949
  self.saveDatabase(callback);
2945
2950
  }