Skip to content

Commit

Permalink
fix: code
Browse files Browse the repository at this point in the history
  • Loading branch information
andybuibui authored May 25, 2024
1 parent efc5788 commit 8cbde73
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/client/theme-default/builtins/Tree/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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[])
Expand Down Expand Up @@ -93,16 +93,16 @@ const getIcon = (props: TreeNodeProps<DataNode>) => {
const renderSwitcherIcon = (props: TreeNodeProps<DataNode>) => {
const { isLeaf, expanded } = props;
if (isLeaf) {
return <span className={`tree-switcher-leaf-line`} />;
return <span className="tree-switcher-leaf-line" />;
}
return expanded ? (
<span className={`tree-switcher-line-icon`}>
<span className="tree-switcher-line-icon">
<span className="dumi-default-tree-icon">
<MinusSquareOutlined fill="currentColor" />
</span>
</span>
) : (
<span className={`tree-switcher-line-icon`}>
<span className="tree-switcher-line-icon">
<span className="dumi-default-tree-icon">
<PlusSquareOutlined fill="currentColor" />
</span>
Expand Down

0 comments on commit 8cbde73

Please sign in to comment.