Skip to content

Commit

Permalink
fix failed test
Browse files Browse the repository at this point in the history
  • Loading branch information
amine-ini committed Dec 21, 2022
1 parent cc33501 commit c5c4d20
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const handleValueAttr = (children) => {
child = {...child};
child.props = {...child.props}

if (['input', 'textarea', 'select'].indexOf(child.type) >= 0 && Object.hasOwn(child.props, 'value')) {
if (['input', 'textarea', 'select'].indexOf(child.type) >= 0 && child.props.hasOwnProperty('value')) {
child.props.defaultValue = child.props.value;
delete child.props.value;
}
Expand Down

0 comments on commit c5c4d20

Please sign in to comment.