Issue when content is number.
nikeshmhr opened this issue · comments
Describe the bug
When the content to truncate is number an error occurs.
To Reproduce
<TruncateMarkup lines={1} ...>
<div>
{1}
</div>
</TruncateMarkup>
Here's the code sandbox https://codesandbox.io/s/react-truncate-markup-issue-4xgwc?file=/src/App.js
Thanks for reporting @nikeshmhr. We need to check for the number type here. Would you like to create a PR with the fix?
Yeah, sure I'll create PR. Thanks @patrik-piskay