Skip to content

Commit 5d4eb48

Browse files
authored
optimize FeatureFlagComponent (#5176)
1 parent 072b349 commit 5d4eb48

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

redisinsight/ui/src/components/feature-flag-component/FeatureFlagComponent.tsx

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,7 @@ const FeatureFlagComponent = (props: Props) => {
2929
return null
3030
}
3131

32-
const cloneElement = (child: React.ReactElement) => React.cloneElement(child)
33-
34-
return isArray(children) ? (
35-
<>{React.Children.map(children, cloneElement)}</>
36-
) : (
37-
cloneElement(children)
38-
)
32+
return <>{children}</>
3933
}
4034

4135
export default FeatureFlagComponent

0 commit comments

Comments
 (0)