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

fix(#11315): don't call getLabelAndValue on null controller #11576

Conversation

mihai-peteu
Copy link

Suggested fix for #11315

@mihai-peteu
Copy link
Author

@etimberg | @LeeLenaleee
CI got snagged on a codeclimate check. I'm open to solutions on how to trim the function I touched down to 25 lines 😬

Copy link
Collaborator

@LeeLenaleee LeeLenaleee left a comment

Choose a reason for hiding this comment

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

It would be nice to have a test that shows this will fix it. Because I think you might shift the problem to other parts where the code expects values to be present which get set to null/undefined right now

@joshkel
Copy link
Contributor

joshkel commented Nov 28, 2023

This change may have unintended effects. Currently, the TooltipItem type is defined as always providing a dataset. I experimented with this fix locally, any my code threw errors because my callbacks expected a dataset that was now not necessarily present.

I have an alternative candidate fix at #11596; I'm not sure if that approach is better or not.

@mihai-peteu
Copy link
Author

Closing in favor of #11596

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.

None yet

3 participants