Skip to content

Commit 4d0f87a

Browse files
committed
chore(ui): button use checkNodeExist check icon
1 parent a4e3077 commit 4d0f87a

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

packages/ui/src/components/button/Button.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import type { DSize } from '../../utils/types';
33
import React from 'react';
44

55
import { LoadingOutlined } from '@react-devui/icons';
6-
import { getClassName } from '@react-devui/utils';
6+
import { checkNodeExist, getClassName } from '@react-devui/utils';
77

88
import { useWave, useGeneralContext } from '../../hooks';
99
import { registerComponentMate, TTANSITION_DURING_SLOW } from '../../utils';
@@ -85,7 +85,7 @@ function Button(props: DButtonProps, ref: React.ForwardedRef<HTMLButtonElement>)
8585
}
8686
}}
8787
>
88-
{dIcon ? (
88+
{checkNodeExist(dIcon) ? (
8989
buttonIcon(dLoading)
9090
) : (
9191
<DCollapseTransition

0 commit comments

Comments
 (0)