From 9c4034a1642003ddc5a3eb6670d91b854fa40af4 Mon Sep 17 00:00:00 2001 From: ayang <75017711+ayangweb@users.noreply.github.com> Date: Sun, 23 Apr 2023 23:38:52 +0800 Subject: [PATCH] style: optimized code (#41957) --- components/tooltip/index.tsx | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/components/tooltip/index.tsx b/components/tooltip/index.tsx index a10606c85f..2778a32226 100644 --- a/components/tooltip/index.tsx +++ b/components/tooltip/index.tsx @@ -331,12 +331,11 @@ const Tooltip = React.forwardRef((props, ref) => { return overlay || title || ''; }, [overlay, title]); - const memoOverlayWrapper = - typeof memoOverlay === 'function' ? ( - () => {memoOverlay()} - ) : ( - {memoOverlay} - ); + const memoOverlayWrapper = ( + + {typeof memoOverlay === 'function' ? memoOverlay() : memoOverlay} + + ); const { getPopupContainer,