Skip to content

Commit

Permalink
feat(odyssey-react-mui): add back hide variable. Tighten hide logic
Browse files Browse the repository at this point in the history
  • Loading branch information
bryancunningham-okta committed Dec 1, 2023
1 parent 1d60196 commit a113c16
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/odyssey-react-mui/src/Badge.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,9 @@ const Badge = ({
[type, contentIsLongerThanOneChar, odysseyDesignTokens]
);

if (!badgeContent) {
const shouldHideBadge = badgeContent <= 0 || !badgeContent;

if (shouldHideBadge) {
return null;
}

Expand Down

0 comments on commit a113c16

Please sign in to comment.