hypercore 11.0.15 → 11.0.16
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/core.js +4 -0
- package/package.json +1 -1
package/lib/core.js
CHANGED
|
@@ -150,6 +150,10 @@ module.exports = class Core {
|
|
|
150
150
|
overwrite = true
|
|
151
151
|
}
|
|
152
152
|
|
|
153
|
+
if (!header && (opts.discoveryKey && !(opts.key || opts.manifest))) {
|
|
154
|
+
throw STORAGE_EMPTY('No Hypercore is stored here')
|
|
155
|
+
}
|
|
156
|
+
|
|
153
157
|
if (!header || overwrite) {
|
|
154
158
|
if (!createIfMissing) {
|
|
155
159
|
throw STORAGE_EMPTY('No Hypercore is stored here')
|