-
-
Notifications
You must be signed in to change notification settings - Fork 10.4k
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
Bug when using rr with babel-plugin-transform-remove-prop-types #4493
Comments
What error are you getting? That the propTypes don't exist or aren't an object? Honestly, I'm not sure if this is our responsibility though. That plugin isn't super-common to be used and is something outside of this library that's interfering. Also, it isn't supposed to run on node_modules, just your own code. |
That's a good point @timdorr, I raised an issue against the plugin: oliviertassinari/babel-plugin-transform-react-remove-prop-types#82 To answer your question, I'm getting "cannot call Object.keys on undefined", since the |
Looks like this is more on bptrrpt (™!) to provide some sort of fix for. I'm happy to add in some small guard comments or some other indicator that it should ignore that line of code, but this isn't a "React Router problem" per se. So, closing this one out. Thanks for bringing it up, @yaycmyk! |
Due to this line: https://github.com/ReactTraining/react-router/blob/389df9c0ba603b758de4a979a34ee10276f9a8d0/modules/Router.js#L135
I got around this in another library I maintain by requiring that defaultProps be set for each propType and then doing what you're doing with defaultProps instead.
The text was updated successfully, but these errors were encountered: