Browse Source

refactoring: refactor search code (#19441)

* refactor search code

* refactor bool expression no implicit cast
pull/19452/head
Rustin 5 years ago
committed by 只捱宅
parent
commit
17ad782dfc
  1. 3
      components/breadcrumb/Breadcrumb.tsx
  2. 6
      components/tooltip/index.tsx

3
components/breadcrumb/Breadcrumb.tsx

@ -159,7 +159,8 @@ export default class Breadcrumb extends React.Component<BreadcrumbProps, any> {
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",
);

6
components/tooltip/index.tsx

@ -95,9 +95,9 @@ const splitObject = (obj: any, keys: string[]) => {
function getDisabledCompatibleChildren(element: React.ReactElement<any>) {
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
) {

Loading…
Cancel
Save