react-email icon indicating copy to clipboard operation
react-email copied to clipboard

mso-font-width: NaN%

Open christoph-pflueger opened this issue 5 months ago • 1 comments

Describe the Bug

In the function computeFontWidthAndSpaceCount in the Button component, a division by zero results in <!--[if mso]><i style="mso-font-width:NaN%;mso-text-raise:18" hidden></i><![endif]-->.

Which package is affected (leave empty if unsure)

@react-email/button

Link to the code that reproduces this issue

https://github.com/resend/react-email/blob/canary/packages/button/src/snapshots/button.spec.tsx.snap

To Reproduce

Not needed, as even the snapshots contain the bug.

Expected Behavior

It should not result in NaN%

What's your node version? (if relevant)

No response

christoph-pflueger avatar Aug 29 '24 13:08 christoph-pflueger