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

Commit e39dc99

Browse files
committed
onwait should take the core as the 2nd arg
1 parent 4ab6b02 commit e39dc99

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -664,8 +664,8 @@ module.exports = class Hypercore extends EventEmitter {
664664
if (this.cache) this.cache.set(index, req)
665665
} else {
666666
if (opts && opts.wait === false) return null
667-
if (opts && opts.onwait) opts.onwait(index)
668-
else if (this.onwait) this.onwait(index)
667+
if (opts && opts.onwait) opts.onwait(index, this)
668+
else if (this.onwait) this.onwait(index, this)
669669

670670
const activeRequests = (opts && opts.activeRequests) || this.activeRequests
671671

0 commit comments

Comments
 (0)