Comparing version 6.0.3 to 6.0.4
26
index.js
@@ -340,11 +340,11 @@ const b4a = require('b4a') | ||
this._initialViews = null | ||
} else { | ||
// check if this is a v0 base | ||
const record = await this.local.getUserData('autobase/system') | ||
if (record !== null) { | ||
this.reindexing = true | ||
this.emit('reindexing') | ||
} | ||
} | ||
// check if this is a v0 base | ||
const record = await this.local.getUserData('autobase/system') | ||
if (record !== null && (await this.local.getUserData('autobase/reindexed')) === null) { | ||
this.reindexing = true | ||
this.emit('reindexing') | ||
} | ||
// load previous digest if available | ||
@@ -389,3 +389,3 @@ if (this.localWriter && !this.system.bootstrapping) { | ||
if (this.reindexing) this.update().then(() => { this.reindexing = false }, safetyCatch) | ||
if (this.reindexing) this._setReindexed() | ||
@@ -395,2 +395,12 @@ this.queueFastForward() | ||
async _setReindexed () { | ||
try { | ||
await this.update() | ||
await this.local.setUserData('autobase/reindexed', b4a.from([0])) | ||
this.reindexing = false | ||
} catch (err) { | ||
safetyCatch(err) | ||
} | ||
} | ||
async _close () { | ||
@@ -397,0 +407,0 @@ await Promise.resolve() // defer one tick |
{ | ||
"name": "autobase", | ||
"version": "6.0.3", | ||
"version": "6.0.4", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
163547
4376