Skip to content

Commit

Permalink
remove checking child count
Browse files Browse the repository at this point in the history
  • Loading branch information
sai6855 committed Jul 7, 2024
1 parent 5bc21fa commit 916818e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/mui-material/src/utils/getChildRef.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as React from 'react';

export default function getChildRef(child) {
if (!child || !React.isValidElement(child) || React.Child.count(child) !== 1) {
if (!child || !React.isValidElement(child)) {
return null;
}
// 'ref' is passed as prop in React 19, whereas 'ref' is directly attached to child in React 18
Expand Down

0 comments on commit 916818e

Please sign in to comment.