Skip to content

setRelated and appendRelated return undefined #1987

@leontastic

Description

@leontastic

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions