-
Notifications
You must be signed in to change notification settings - Fork 651
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 Transition passes through all props to children in production build #123
Conversation
src/Transition.js
Outdated
@@ -303,7 +438,7 @@ class Transition extends React.Component { | |||
} | |||
|
|||
const {children, ...childProps} = this.props; | |||
Object.keys(Transition.propTypes).forEach(key => delete childProps[key]); | |||
Object.keys(propTypes).forEach(key => delete childProps[key]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lets do delete props.foo
for each one manually instead, its a bit uglier but maintains the optimization
5b34d66
to
226213f
Compare
226213f
to
0987135
Compare
@jquense Thanks! I've changed to delete the props manually and added a test for this. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wonderful thanks!
Thanks! |
Fix #107