hypercore 10.24.2 → 10.24.3

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/lib/batch.js +2 -2
  2. package/package.json +1 -1
package/lib/batch.js CHANGED
@@ -76,6 +76,7 @@ module.exports = class HypercoreBatch extends EventEmitter {
76
76
  async update (opts) {
77
77
  if (this.opened === false) await this.ready()
78
78
  await this.session.update(opts)
79
+ await this._catchup()
79
80
  }
80
81
 
81
82
  setUserData (key, value, opts) {
@@ -277,8 +278,7 @@ module.exports = class HypercoreBatch extends EventEmitter {
277
278
  this._sessionLength = this.session.length
278
279
  this._sessionByteLength = this.session.byteLength
279
280
  this._sessionBatch = this.session.createTreeBatch()
280
-
281
- if (offset) this._appends = this._appends.slice(this._appends.length - offset)
281
+ this._appends = this._appends.slice(this._appends.length - offset)
282
282
 
283
283
  return true
284
284
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hypercore",
3
- "version": "10.24.2",
3
+ "version": "10.24.3",
4
4
  "description": "Hypercore is a secure, distributed append-only log",
5
5
  "main": "index.js",
6
6
  "scripts": {