Skip to content

Commit

Permalink
Merge pull request #441 from PayButton/fix/text-empty-nbsp
Browse files Browse the repository at this point in the history
fix: text empty nbsp
  • Loading branch information
Klakurka authored Dec 20, 2024
2 parents f9d3366 + 6067bc8 commit 597a35c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion react/lib/components/Button/Button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,8 @@ export const Button = (props: ButtonProps): React.ReactElement => {
onMouseLeave={handleMouseLeave}
ref={buttonRef}
>
<span>{transitioning !== hovering ? hoverText : text}</span>
<span> {transitioning !== hovering ? hoverText : (text && text.trim() !== "" ? text : <div>&nbsp;</div>)}
</span>
</MuiButton>
</div>
);
Expand Down

0 comments on commit 597a35c

Please sign in to comment.