diff --git a/lib/include.js b/lib/include.js index 4060e55e..c459451b 100644 --- a/lib/include.js +++ b/lib/include.js @@ -96,10 +96,9 @@ Inclusion.include = function (objects, include, cb) { var relation = relations[relationName]; if (!relation) { - return function () { - cb(new Error('Relation "' + relationName + '" is not defined for ' - + self.modelName + ' model')); - }; + cb(new Error('Relation "' + relationName + '" is not defined for ' + + self.modelName + ' model')); + return; } // Calling the relation method for each object