diff --git a/components/breadcrumb/Breadcrumb.tsx b/components/breadcrumb/Breadcrumb.tsx index c603eacf5c..56182ccce5 100755 --- a/components/breadcrumb/Breadcrumb.tsx +++ b/components/breadcrumb/Breadcrumb.tsx @@ -159,7 +159,8 @@ export default class Breadcrumb extends React.Component { warning( element.type && - (element.type.__ANT_BREADCRUMB_ITEM || element.type.__ANT_BREADCRUMB_SEPARATOR), + (element.type.__ANT_BREADCRUMB_ITEM === true || + element.type.__ANT_BREADCRUMB_SEPARATOR === true), 'Breadcrumb', "Only accepts Breadcrumb.Item and Breadcrumb.Separator as it's children", ); diff --git a/components/tooltip/index.tsx b/components/tooltip/index.tsx index 327f175386..a0dc3ee8d2 100644 --- a/components/tooltip/index.tsx +++ b/components/tooltip/index.tsx @@ -95,9 +95,9 @@ const splitObject = (obj: any, keys: string[]) => { function getDisabledCompatibleChildren(element: React.ReactElement) { const elementType = element.type as any; if ( - (elementType.__ANT_BUTTON || - elementType.__ANT_SWITCH || - elementType.__ANT_CHECKBOX || + (elementType.__ANT_BUTTON === true || + elementType.__ANT_SWITCH === true || + elementType.__ANT_CHECKBOX === true || element.type === 'button') && element.props.disabled ) {