Skip to content

Commit

Permalink
fix: code
Browse files Browse the repository at this point in the history
  • Loading branch information
andybuibui committed May 30, 2024
1 parent 3ef58dd commit 57969cc
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 57969cc

Please sign in to comment.