Skip to content

Commit

Permalink
findAndCountAll empty include error fixed.
Browse files Browse the repository at this point in the history
  • Loading branch information
Malte Legenhausen committed Dec 10, 2014
1 parent 504940f commit 641cbd9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/model.js
Original file line number Diff line number Diff line change
Expand Up @@ -874,8 +874,8 @@ module.exports = (function() {
// no limit, offset, order, attributes for the options given to count()
, countOptions = _.omit(_.clone(findOptions), ['offset', 'limit', 'order', 'attributes']);

conformOptions(countOptions);
if (countOptions.include) {
conformOptions(countOptions);
countOptions.include = _.cloneDeep(countOptions.include, function (element) {
if (element instanceof Model) return element;
if (element instanceof Association) return element;
Expand Down

0 comments on commit 641cbd9

Please sign in to comment.