malte-wessel / react-textfit

React component to fit headlines and paragraphs into elements
http://malte-wessel.github.io/react-textfit/
MIT License
470 stars 143 forks source link

Refuse to process if originalWidth or originalHeight are NaN #2

Closed awinograd closed 8 years ago

awinograd commented 8 years ago

These values can be NaN if the element isn't yet added to the DOM or window.getComputedStyle is returning "" for some other reason. When that happens, react-textfit gets stuck in an infinite loop.

malte-wessel commented 8 years ago

Thx! I published this with v0.1.8.

awinograd commented 8 years ago

Great! Thanks for a nice component!