hypercore 10.21.0 → 10.21.1
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 +2 -2
- package/lib/batch.js +4 -0
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -338,8 +338,8 @@ module.exports = class Hypercore extends EventEmitter {
|
|
|
338
338
|
const result = await preload()
|
|
339
339
|
const from = result && result.from
|
|
340
340
|
if (from) {
|
|
341
|
-
if (!from.opened) await from.ready()
|
|
342
|
-
if (from.closing) continue
|
|
341
|
+
if (!from.opened) await from.ready().catch(noop)
|
|
342
|
+
if (!from.opened || from.closing) continue
|
|
343
343
|
}
|
|
344
344
|
return result
|
|
345
345
|
}
|
package/lib/batch.js
CHANGED