autobee 2.0.0-rc.7 → 2.0.0-rc.8

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/topo.js +5 -1
  2. package/package.json +1 -1
package/lib/topo.js CHANGED
@@ -255,8 +255,12 @@ async function getOplogBatch(undo, core, length, weight, index) {
255
255
  }
256
256
 
257
257
  function getLocalBatch(undo, writer, length, weight, index) {
258
+ if (writer.core.closed) throw new Error('Writer core is closed')
259
+
258
260
  if (length > writer.core.length) {
259
- if (!writer.pending) throw new Error('No local nodes')
261
+ if (!writer.pending) {
262
+ throw new Error(`No local nodes: looking for ${length}, found ${writer.core.length}`)
263
+ }
260
264
 
261
265
  let i = 0
262
266
  while (i < writer.pending.length) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "autobee",
3
- "version": "2.0.0-rc.7",
3
+ "version": "2.0.0-rc.8",
4
4
  "description": "Bee based autobase",
5
5
  "license": "Apache-2.0",
6
6
  "author": "Holepunch Inc.",