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

[core] Remove useless apiRef optional chaining or non-null assertions #2455

Merged
merged 8 commits into from Aug 26, 2021

Conversation

flaviendelangle
Copy link
Member

@flaviendelangle flaviendelangle commented Aug 26, 2021

When provided from useGridApiContext or passed to a feature hook, apiRef and apiRef.current are always defined.

I did not fixed the apiRef!.components!.XXX calls since they will be removed in #2433

@flaviendelangle flaviendelangle added the core Infrastructure work going on behind the scenes label Aug 26, 2021
@flaviendelangle flaviendelangle self-assigned this Aug 26, 2021
@flaviendelangle
Copy link
Member Author

The tests are passing locally and there is no behavior change.
I'm merging it since it's modifying a large amount of files.

@flaviendelangle flaviendelangle merged commit 053e1f2 into mui:next Aug 26, 2021
@flaviendelangle flaviendelangle deleted the api-ref-never-null branch August 26, 2021 12:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Infrastructure work going on behind the scenes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant