Skip to content

Commit

Permalink
feat(promise): moved .reject from bluebird to native promise
Browse files Browse the repository at this point in the history
  • Loading branch information
billatnpm authored and isaacs committed Sep 15, 2019
1 parent 5d832f3 commit 1d56da1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/content/write.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@ function write (cache, data, opts) {
)
}
if (typeof opts.size === 'number' && data.length !== opts.size) {
return BB.reject(sizeError(opts.size, data.length))
return Promise.reject(sizeError(opts.size, data.length))
}
const sri = ssri.fromData(data, {
algorithms: opts.algorithms
})
if (opts.integrity && !ssri.checkData(data, opts.integrity, opts)) {
return BB.reject(checksumError(opts.integrity, sri))
return Promise.reject(checksumError(opts.integrity, sri))
}
return makeTmp(cache, opts)
.then((tmp) => {
Expand Down

0 comments on commit 1d56da1

Please sign in to comment.