Skip to content

Commit

Permalink
fix(checkStream): make sure to pass all opts through
Browse files Browse the repository at this point in the history
opts.algorithms was not getting passed in, which caused issues
  • Loading branch information
zkat committed Jun 7, 2017
1 parent 75be125 commit 0b1bcbe
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -214,12 +214,9 @@ module.exports.checkStream = checkStream
function checkStream (stream, sri, opts) {
opts = opts || {}
const P = opts.Promise || Promise
const checker = integrityStream({
integrity: sri,
size: opts.size,
strict: opts.strict,
pickAlgorithm: opts.pickAlgorithm
})
const checker = integrityStream(Object.assign({}, opts, {
integrity: sri
}))
return new P((resolve, reject) => {
stream.pipe(checker)
stream.on('error', reject)
Expand Down

0 comments on commit 0b1bcbe

Please sign in to comment.