diff --git a/src/model.js b/src/model.js index 051d8d2bb3b6..eef43d15cb33 100644 --- a/src/model.js +++ b/src/model.js @@ -2979,7 +2979,7 @@ class Model { if (include.association.through.model.rawAttributes[attr]._autoGenerated || attr === include.association.foreignKey || attr === include.association.otherKey - || typeof associationInstance[include.association.through.model.name][attr] === undefined) { + || typeof associationInstance[include.association.through.model.name][attr] === 'undefined') { continue; } @@ -4300,7 +4300,7 @@ class Model { if (include.association.through.model.rawAttributes[attr]._autoGenerated || attr === include.association.foreignKey || attr === include.association.otherKey - || typeof instance[include.association.through.model.name][attr] === undefined) { + || typeof instance[include.association.through.model.name][attr] === 'undefined') { continue; }