Skip to content

Conversation

@bkoltai
Copy link
Contributor

@bkoltai bkoltai commented Sep 24, 2018

Description of change

Closes #9952

@codecov
Copy link

codecov bot commented Sep 25, 2018

Codecov Report

Merging #9953 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #9953   +/-   ##
=======================================
  Coverage   96.09%   96.09%           
=======================================
  Files          63       63           
  Lines        9402     9402           
=======================================
  Hits         9035     9035           
  Misses        367      367
Impacted Files Coverage Δ
lib/associations/helpers.js 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 214c791...35a80ae. Read the comment docs.

for (const method of methods) {
// don't override custom methods
if (!obj[association.accessors[method]]) {
if (!obj.hasOwnProperty(association.accessors[method]) && !obj[association.accessors[method]]) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just !obj.hasOwnProperty(association.accessors[method]) should be enough

@bkoltai
Copy link
Contributor Author

bkoltai commented Sep 25, 2018 via email

@sushantdhiman
Copy link
Contributor

Just change this, I'll see if i can fix those tests

@bkoltai
Copy link
Contributor Author

bkoltai commented Sep 27, 2018

Ok, I've updated that line to just use the hasOwnProperty

@bkoltai bkoltai force-pushed the 9952-fix-custom-method-override-check branch from af1e95f to 35a80ae Compare September 27, 2018 15:02
@sushantdhiman
Copy link
Contributor

Looks like all tests are passing, merging

@sushantdhiman sushantdhiman merged commit 71e3b59 into sequelize:master Sep 28, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants