Skip to content
This repository has been archived by the owner on Jul 3, 2019. It is now read-only.

Commit

Permalink
fix(cache): this is really a user error, so just throw
Browse files Browse the repository at this point in the history
  • Loading branch information
zkat committed Feb 21, 2017
1 parent 7770e72 commit 5c9c0fa
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions lib/cache/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,11 +114,7 @@ function getStream (byDigest, cache, key, opts) {
opts = opts || {}
var stream
if (!cache || !key) {
stream = through()
var err = new Error('no cache or key')
err.code = 'ENOENT'
setImmediate(function () { stream.emit('error', err) })
return stream
throw new Error('cache and key are required')
}
var memoed = MEMOIZED[cache + ':' + key]
if (memoed) {
Expand Down

0 comments on commit 5c9c0fa

Please sign in to comment.