hypercore-storage 1.8.4 → 1.8.5

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.
@@ -433,6 +433,7 @@ async function core (core, { version, dryRun = true, gc = true }) {
433
433
 
434
434
  for (const index of allBits(bitfield)) {
435
435
  if (headerBits.get(index) === false) continue
436
+ if (index >= head.length) continue
436
437
 
437
438
  setBitInPage(index)
438
439
 
@@ -451,6 +452,7 @@ async function core (core, { version, dryRun = true, gc = true }) {
451
452
 
452
453
  for (const [index, bit] of headerBits) {
453
454
  if (!bit) continue
455
+ if (index >= head.length) continue
454
456
 
455
457
  setBitInPage(index)
456
458
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hypercore-storage",
3
- "version": "1.8.4",
3
+ "version": "1.8.5",
4
4
  "main": "index.js",
5
5
  "files": [
6
6
  "index.js",