hypercore 10.0.0-alpha.50 → 10.0.0-alpha.51

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/lib/replicator.js CHANGED
@@ -1191,7 +1191,7 @@ module.exports = class Replicator {
1191
1191
  for (let i = 0; i < this._ranges.length; i++) {
1192
1192
  const r = this._ranges[i]
1193
1193
 
1194
- while (r.start < r.end && this.core.bitfield.get(mapIndex(r.blocks, r.start)) === true) r.start++
1194
+ while ((r.end === -1 || r.start < r.end) && this.core.bitfield.get(mapIndex(r.blocks, r.start)) === true) r.start++
1195
1195
  while (r.start < r.end && this.core.bitfield.get(mapIndex(r.blocks, r.end - 1)) === true) r.end--
1196
1196
 
1197
1197
  if (r.end !== -1 && r.start >= r.end) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hypercore",
3
- "version": "10.0.0-alpha.50",
3
+ "version": "10.0.0-alpha.51",
4
4
  "description": "Hypercore 10",
5
5
  "main": "index.js",
6
6
  "scripts": {