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] Replace references to non-existent PropTypes.function with PropTypes.func #2257

Merged
merged 1 commit into from
May 25, 2022

Conversation

gustaff-weldon
Copy link
Contributor

@gustaff-weldon gustaff-weldon commented May 25, 2022

Fixes #2063

Several places in Victory reference non-existent PropTypes.function validator. This seem to be a common error, as exactly the same case is pointed out in prop-types codebase:
https://github.com/facebook/prop-types/blob/4de0644a10a554d0a556daa39f029369bc007ea5/checkPropTypes.js#L55-L57

This causes warning in console:

'Warning: Failed prop type: VictoryScatter: prop type externalEventMutations[0].callback is invalid; it must be a function, usually from the prop-types package, but received undefined.'

This PR replaces validators with PropTypes.func (https://github.com/facebook/prop-types#usage)

@gustaff-weldon
Copy link
Contributor Author

gustaff-weldon commented May 25, 2022

@becca-bailey it would be great if this bugfix can be released quickly, currently we need to resort to running from fork as our CI setup fails on component render warnings

@becca-bailey
Copy link
Contributor

@gustaff-weldon thanks for looking into this, I'll get this merged and released ASAP.

@becca-bailey becca-bailey merged commit 380dda1 into FormidableLabs:main May 25, 2022
@becca-bailey
Copy link
Contributor

We don't have permission to run the docs and CI publish scripts from a fork, which is why some CI steps were failing. We're looking into fixing this in the future, but I don't anticipate any issues with this particular PR since it is only updating prop types.

@gustaff-weldon
Copy link
Contributor Author

@becca-bailey thanks for super quick turn-around on releasing this 🙇

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.

VictoryScatter: externalEventMutations prop type invalid warning
2 participants