Skip to content

Commit 1d56da1

Browse files
billatnpmisaacs
authored andcommitted
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

lib/content/write.js

Lines changed: 2 additions & 2 deletions
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)