Skip to content

Commit

Permalink
Verify that values exist before sending back a model from adapter.
Browse files Browse the repository at this point in the history
  • Loading branch information
mikermcneil committed Mar 14, 2013
1 parent be87c0d commit f3d1673
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/waterline/collection.js
Original file line number Diff line number Diff line change
Expand Up @@ -651,7 +651,7 @@ function buildModel (collection, cb) {
mappedSet = util.pluralize(mappedSet, function (model) {
model.save = _.bind(collection.__save, collection, collection.identity, model);
model.destroy = _.bind(collection.__destroy, collection, collection.identity, model);
model.values = _.omit(model,['save','destroy','values']);
model.values = _.omit(model,['save','destroy','values']) || {};
return model;
});

Expand Down

0 comments on commit f3d1673

Please sign in to comment.