Skip to content

Commit

Permalink
Fix conditional rendering in CommonTag component
Browse files Browse the repository at this point in the history
  • Loading branch information
trheyi committed Mar 16, 2024
1 parent c4d0095 commit d060b9c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/xgen/components/view/Tag/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ interface IPropsCommonTag {
}

const CommonTag = window.$app.memo(({ pure, margin, item }: IPropsCommonTag) => {
if (!item) return <span>-</span>
if (!item || (!item.label && !item.value)) return <span>-</span>
if (pure) return <span>{item.label}</span>

const style: React.CSSProperties = {}
Expand Down

0 comments on commit d060b9c

Please sign in to comment.