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

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

Open
luxzeitlos opened this issue Mar 3, 2018 · 0 comments
Open

Comments

@luxzeitlos
Copy link
Contributor

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.

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

No branches or pull requests

1 participant