Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 1d56da1

Browse files
billatnpmisaacs
authored andcommittedSep 15, 2019
feat(promise): moved .reject from bluebird to native promise
1 parent 5d832f3 commit 1d56da1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

Diff for: ‎lib/content/write.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,13 @@ function write (cache, data, opts) {
2727
)
2828
}
2929
if (typeof opts.size === 'number' && data.length !== opts.size) {
30-
return BB.reject(sizeError(opts.size, data.length))
30+
return Promise.reject(sizeError(opts.size, data.length))
3131
}
3232
const sri = ssri.fromData(data, {
3333
algorithms: opts.algorithms
3434
})
3535
if (opts.integrity && !ssri.checkData(data, opts.integrity, opts)) {
36-
return BB.reject(checksumError(opts.integrity, sri))
36+
return Promise.reject(checksumError(opts.integrity, sri))
3737
}
3838
return makeTmp(cache, opts)
3939
.then((tmp) => {

0 commit comments

Comments
 (0)
Failed to load comments.