Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion lib/streams.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ class BlobReadStream extends Readable {
this.id = id
this.core = core.session({ wait: opts.wait, timeout: opts.timeout })

this._prefetch = opts.prefetch
this._prefetch = opts.wait === false ? noPrefetch : opts.prefetch
this._lastPrefetch = null
if (!this._prefetch) {
const prefetcher = new SparsePrefetcher(opts)
Expand Down Expand Up @@ -174,3 +174,7 @@ module.exports = {
}

function noop () {}

function noPrefetch () {
return null
}