From 57969cca6962d2124583c0ec6b4368ea10ea4f85 Mon Sep 17 00:00:00 2001 From: andybuibui <917655399@qq.com> Date: Sat, 25 May 2024 15:28:29 +0800 Subject: [PATCH] fix: code --- src/client/theme-default/builtins/Tree/index.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/client/theme-default/builtins/Tree/index.tsx b/src/client/theme-default/builtins/Tree/index.tsx index c2ea2cf95..8195e50b5 100644 --- a/src/client/theme-default/builtins/Tree/index.tsx +++ b/src/client/theme-default/builtins/Tree/index.tsx @@ -32,7 +32,7 @@ function getTreeFromList(nodes: ReactNode, prefix = '') { } case 'li': { - const hasEmptyUl = node.props?.children?.some?.( + const hasEmptyUl = node.props.children?.some?.( (child) => child.type === 'ul' && !child.props.children?.length, ); const title = ([] as ReactNode[]) @@ -93,16 +93,16 @@ const getIcon = (props: TreeNodeProps) => { const renderSwitcherIcon = (props: TreeNodeProps) => { const { isLeaf, expanded } = props; if (isLeaf) { - return ; + return ; } return expanded ? ( - + ) : ( - +