From 326784ddf98bd58daff4e5f86d7ee971709242bd Mon Sep 17 00:00:00 2001 From: Ritchie Martori Date: Sun, 11 Nov 2012 01:18:28 -0800 Subject: [PATCH] fixed domain not defined bug in collection --- lib/resources/collection/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); }