From 916818e4fd47e7fd19924395a3ee6053d3d64402 Mon Sep 17 00:00:00 2001 From: sai6855 Date: Sun, 7 Jul 2024 19:02:34 +0530 Subject: [PATCH] remove checking child count --- packages/mui-material/src/utils/getChildRef.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/mui-material/src/utils/getChildRef.js b/packages/mui-material/src/utils/getChildRef.js index 39d785ae5c89a0..42631ccc34d71f 100644 --- a/packages/mui-material/src/utils/getChildRef.js +++ b/packages/mui-material/src/utils/getChildRef.js @@ -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