diff --git a/components/_util/reactNode.ts b/components/_util/reactNode.ts index 1fc075b619..38e23ee422 100644 --- a/components/_util/reactNode.ts +++ b/components/_util/reactNode.ts @@ -3,7 +3,7 @@ import * as React from 'react'; export const { isValidElement } = React; export function isFragment(child: React.ReactElement): boolean { - return child && child.type === React.Fragment; + return child && isValidElement(child) && child.type === React.Fragment; } type AnyObject = Record;