Skip to content

Commit

Permalink
Add a ts comment to ignore error
Browse files Browse the repository at this point in the history
  • Loading branch information
Damans227 committed Nov 17, 2021
1 parent 0741443 commit a4f2fff
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ interface FormattedNumberProps {

function FormattedNumber({ num = 0, format }: FormattedNumberProps) {
if (format) {
return <span title={`${num}`}>{formatNumber(format, num as number)}</span>;
// @ts-expect-error formatNumber can actually accept strings, even though it's not typed as such
return <span title={`${num}`}>{formatNumber(format, num)}</span>;
}
return <span>{num}</span>;
}
Expand Down

0 comments on commit a4f2fff

Please sign in to comment.