Skip to content
This repository was archived by the owner on Dec 28, 2022. It is now read-only.

Commit ff81669

Browse files
authored
make constructor onwait and option onwait independent (#122)
1 parent 731e41b commit ff81669

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -683,7 +683,7 @@ module.exports = class Hypercore extends EventEmitter {
683683
} else {
684684
if (opts && opts.wait === false) return null
685685
if (opts && opts.onwait) opts.onwait(index, this)
686-
else if (this.onwait) this.onwait(index, this)
686+
if (this.onwait) this.onwait(index, this)
687687

688688
const activeRequests = (opts && opts.activeRequests) || this.activeRequests
689689

0 commit comments

Comments
 (0)