Permalink
Browse files

handle error paths, again

  • Loading branch information...
1 parent 6e9cdde commit a862d2ab4c848b694502a1a6b36382bf712d756d @dominictarr committed Jan 7, 2013
Showing with 2 additions and 1 deletion.
  1. +2 −1 index.js
View
@@ -48,8 +48,9 @@ function cached (open, onCache) {
}
var clone
var scuttlebutt = open(name, tail, function (err, scuttlebutt) {
+ if(err) return cb(err)
scuttlebutt.name = name
- cb(err, clone || scuttlebutt)
+ cb(null, clone || scuttlebutt)
})
//will callback an error

0 comments on commit a862d2a

Please sign in to comment.