diff --git a/components/modal/confirm.tsx b/components/modal/confirm.tsx index 29f604ec3e..56dcf2e8f3 100644 --- a/components/modal/confirm.tsx +++ b/components/modal/confirm.tsx @@ -136,7 +136,7 @@ export default function confirm(config: ModalFuncProps) { if (unmountResult && div.parentNode) { div.parentNode.removeChild(div); } - const triggerCancel = args && args.length && args.some(param => param && param.triggerCancel); + const triggerCancel = args.some(param => param && param.triggerCancel); if (config.onCancel && triggerCancel) { config.onCancel(...args); }