Skip to content

Commit

Permalink
fix hasOwnProperty check
Browse files Browse the repository at this point in the history
  • Loading branch information
runspired committed Sep 26, 2019
1 parent 1c278b1 commit f79a5f7
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1612,7 +1612,7 @@ export function assertRecordsPassedToHasMany(records) {
assert(
`All elements of a hasMany relationship must be instances of Model, you passed ${inspect(records)}`,
(function() {
return A(records).every(record => record.hasOwnProperty('_internalModel') === true);
return A(records).every(record => Object.prototype.hasOwnProperty.call(record, '_internalModel') === true);
})()
);
}
Expand Down

0 comments on commit f79a5f7

Please sign in to comment.