Skip to content

Commit

Permalink
show diego react error
Browse files Browse the repository at this point in the history
  • Loading branch information
sai6855 committed Jul 3, 2024
1 parent 117305f commit e781158
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/mui-material/src/utils/getChildRef.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
export default function getChildRef(children) {
// 'ref' is passed as prop in React 19, whereas 'ref' is directly attached to children in React 18
// below check is to ensure 'ref' is accessible in both cases
return Object.keys(children.props).includes('ref') ? children.props.ref : children.ref;
// return Object.keys(children.props).includes('ref') ? children.props.ref : children.ref;
return children.props.ref ?? children.ref;
}

0 comments on commit e781158

Please sign in to comment.