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

[TypeScript] Fix useRecordContext may return undefined #9460

Merged
merged 1 commit into from
Nov 20, 2023

Conversation

groomain
Copy link
Contributor

Follow #7498

Because of the type in useContext, the return type of useRecordContext will never be undefined.

But the doc in https://marmelab.com/react-admin/useRecordContext.html#typescript
mention that useRecordContext can be undefined.

Copy link
Collaborator

@djhi djhi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed, thanks!

@djhi djhi added this to the 4.16.1 milestone Nov 20, 2023
@djhi djhi merged commit 3e2b32c into marmelab:master Nov 20, 2023
10 checks passed
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

Successfully merging this pull request may close these issues.

2 participants