Skip to content

when getRelated for a hasOne relationship returns null it throws #436

@luxzeitlos

Description

@luxzeitlos

Cannot read property ‘modelName’ of null

It does this here where denali assumes that relatedRecord may not be null, which is not true.

however I think the fundamental problem is a wrong type definition here, where getRelated may not return null. If we add null there I think typescript would have saved us from that.

Same is true for the adapter here where any seems dangerous.

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