Skip to content

Async in prod and debug version does not perform the same #4428

Closed
@cbou

Description

@cbou

Because of the use of assert in the debug version of EmberJS Data, when using relationship with async: false the records needs to be loaded before using the relationship.

In the prod version, the assert is not present which is allow to the relationship even if the related record is not loaded yet. It will be updated as soon as the record is loaded.

To me the assert should be changed into a warn.

https://github.com/emberjs/data/blob/master/addon/-private/system/relationships/state/belongs-to.js#L143
https://github.com/emberjs/data/blob/master/addon/-private/system/relationships/state/has-many.js#L207

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