Skip to content
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

setRelated and appendRelated return undefined #1987

Closed
leontastic opened this issue Jan 30, 2021 · 3 comments · Fixed by #1988
Closed

setRelated and appendRelated return undefined #1987

leontastic opened this issue Jan 30, 2021 · 3 comments · Fixed by #1988

Comments

@leontastic
Copy link
Contributor

The documentation claims Model.setRelated and Model.appendRelated return the input model for chaining purposes:

I found that these functions return undefined instead of model as the documentation says they should. Opening up the source code it looks like these functions are incorrectly returning this (which is undefined in the scope of the function) instead of model.

The offending lines:

It looks like changing these lines to return model should fix the issue.

@leontastic
Copy link
Contributor Author

@koskimas Also, just wanted to say this library is really incredible. Makes my code beautiful 🌈

@leontastic
Copy link
Contributor Author

Quick fix PR: #1988

koskimas pushed a commit that referenced this issue Jan 30, 2021
@koskimas
Copy link
Collaborator

Thanks for the fix. I've merged it and 2.2.14 version will be released as soon as the CI is done.

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 a pull request may close this issue.

2 participants