New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
this
returns undefined inside of getterMethods object
#5304
Comments
I believe it might be due to you using the new arrow function syntax, which actually changes how Click here for more info on how |
Yep, using arrow functions incorrectly. |
Drep, totally overlooked that. |
Took me an hour to find this. I wasn't googling right I guess. Thank you. |
Also took me a while to find this :( Have found instead of replacing arrow functions with
|
Wowwwww. Thank you so much. |
Used Sequelize CLI generate a new project and using the CLI to create models and migrations and created a Players model:
Trying to create the fullName inside of the returns an error:
If I do
console.log(this);
within the getterMethods it always returns undefined. I've tried to few different combinations to get access to the values but I can't get anything to work. What am I missing?The text was updated successfully, but these errors were encountered: