autobee 2.11.1 → 2.11.2
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/index.js +1 -3
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -684,8 +684,6 @@ module.exports = class Autobee extends ReadyResource {
|
|
|
684
684
|
}
|
|
685
685
|
|
|
686
686
|
async compactMaybe() {
|
|
687
|
-
if (!this.writers.writable) return
|
|
688
|
-
|
|
689
687
|
if (await this._isReindexed()) return
|
|
690
688
|
|
|
691
689
|
await this._reindexBee(this._workingBee)
|
|
@@ -710,7 +708,6 @@ module.exports = class Autobee extends ReadyResource {
|
|
|
710
708
|
const head = bee.head()
|
|
711
709
|
const local = bee.context.local
|
|
712
710
|
if (head === null) return
|
|
713
|
-
if (await this._shouldReindex(local.key)) return
|
|
714
711
|
if (!(await this._shouldReindex(head.key))) return
|
|
715
712
|
|
|
716
713
|
// a non-empty local core is a completed reindex whose head was never stored
|
|
@@ -793,6 +790,7 @@ module.exports = class Autobee extends ReadyResource {
|
|
|
793
790
|
|
|
794
791
|
if (this.fastForwardTo !== null) {
|
|
795
792
|
await this._applyFastForward()
|
|
793
|
+
await this.compactMaybe()
|
|
796
794
|
if (changes) changes.track()
|
|
797
795
|
this._needsUpdate = false
|
|
798
796
|
break // revaluate conditions...
|