diff --git a/src/Children/toArray.ts b/src/Children/toArray.ts index 91ba5a41..c504903b 100644 --- a/src/Children/toArray.ts +++ b/src/Children/toArray.ts @@ -1,5 +1,5 @@ import React from 'react'; -import { isFragment } from 'react-is'; +import * as ReactIs from 'react-is'; export interface Option { keepEmpty?: boolean; @@ -18,7 +18,7 @@ export default function toArray( if (Array.isArray(child)) { ret = ret.concat(toArray(child)); - } else if (isFragment(child) && child.props) { + } else if (ReactIs.isFragment(child) && child.props) { ret = ret.concat(toArray(child.props.children, option)); } else { ret.push(child);