-
Notifications
You must be signed in to change notification settings - Fork 643
Closed
Description
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:
- https://github.com/Vincit/objection.js/blame/master/lib/model/modelSet.js#L98
- https://github.com/Vincit/objection.js/blame/master/lib/model/modelSet.js#L114
It looks like changing these lines to return model should fix the issue.
Metadata
Metadata
Assignees
Labels
No labels