Permalink
Browse files

cb error when there is no defined schema

  • Loading branch information...
1 parent 32a8e27 commit d582341dacc3f99ada23dd7b87fb9ee7c75aec3c @dominictarr committed Feb 21, 2013
Showing with 3 additions and 0 deletions.
  1. +3 −0 lib/cache.js
View
@@ -49,6 +49,9 @@ module.exports = function (schema, id, open, onCache) {
var clone
var scuttlebutt = local[name] = schema(name)
+ if(!scuttlebutt)
+ return cb(new Error('no constructor for:'+name))
+
scuttlebutt.name = name
open(scuttlebutt, tail, function (err, scuttlebutt) {

0 comments on commit d582341

Please sign in to comment.