Skip to content

Commit 3a8ef3b

Browse files
committed
Merge pull request sequelize#2707 from werk85/master
findAndCountAll empty include error fixed.
2 parents 504940f + 641cbd9 commit 3a8ef3b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/model.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -874,8 +874,8 @@ module.exports = (function() {
874874
// no limit, offset, order, attributes for the options given to count()
875875
, countOptions = _.omit(_.clone(findOptions), ['offset', 'limit', 'order', 'attributes']);
876876

877+
conformOptions(countOptions);
877878
if (countOptions.include) {
878-
conformOptions(countOptions);
879879
countOptions.include = _.cloneDeep(countOptions.include, function (element) {
880880
if (element instanceof Model) return element;
881881
if (element instanceof Association) return element;

0 commit comments

Comments
 (0)