不要怂,就是干,撸起袖子干!

Commit e6525223 by overlookmotel

association.through not always defined

1 parent a7946541
Showing with 1 additions and 1 deletions
......@@ -556,7 +556,7 @@ module.exports = (function() {
}
// check if model provided is through table
if (!as && parentAssociation && parentAssociation.through.model === model) {
if (!as && parentAssociation && parentAssociation.through && parentAssociation.through.model === model) {
association = {as: Utils.singularize(model.tableName, model.options.language)};
} else {
// find applicable association for linking parent to this model
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!