diff --git a/lib/resources/collection/index.js b/lib/resources/collection/index.js index 833a108..7c20a73 100644 --- a/lib/resources/collection/index.js +++ b/lib/resources/collection/index.js @@ -428,7 +428,7 @@ Collection.prototype.save = function (ctx, fn) { debug('saving %j with id %s', item, query.id); function done(err, item) { - errors = domain.hasErrors() && {errors: errors}; + errors = domain && domain.hasErrors() && {errors: errors}; debug('errors: %j', err); fn(errors || err, item); }