diff --git a/components/modal/ConfirmDialog.tsx b/components/modal/ConfirmDialog.tsx
index 2a698fe4f4..54c0e9686a 100644
--- a/components/modal/ConfirmDialog.tsx
+++ b/components/modal/ConfirmDialog.tsx
@@ -106,9 +106,7 @@ export function ConfirmContent(
)}
{props.content}
- {footer !== undefined ? (
- footer
- ) : (
+ {footer === undefined ? (
+ ) : (
+ footer
)}
);
diff --git a/components/modal/Modal.tsx b/components/modal/Modal.tsx
index 20f5864704..10d6239ff4 100644
--- a/components/modal/Modal.tsx
+++ b/components/modal/Modal.tsx
@@ -182,6 +182,7 @@ const Modal: React.FC = (props) => {
visible,
width = 520,
+ footer,
...restProps
} = props;
@@ -210,11 +211,7 @@ const Modal: React.FC = (props) => {
rootClassName={classNames(hashId, rootClassName)}
wrapClassName={wrapClassNameExtended}
footer={
- props.footer === null ? (
- props.footer
- ) : (
-
- )
+ footer === null ? footer :
}
visible={open ?? visible}
mousePosition={restProps.mousePosition ?? mousePosition}
diff --git a/components/modal/PurePanel.tsx b/components/modal/PurePanel.tsx
index 0ecefa96ae..47ce47e10f 100644
--- a/components/modal/PurePanel.tsx
+++ b/components/modal/PurePanel.tsx
@@ -119,7 +119,7 @@ const PurePanel: React.FC = (props) => {
additionalProps = {
closable: closable ?? true,
title,
- footer: props.footer === null ? props.footer : ,
+ footer: ,
children,
};
}