Try to avoid errors formatting non-numbers

This commit is contained in:
2022-09-07 11:19:15 -05:00
parent 1413e6c8d3
commit 4266ed1690
4 changed files with 26 additions and 4 deletions

View File

@ -64,6 +64,26 @@ class QValueUtils
return (displayValue);
}
public static getFormattedNumber(n: number): string
{
try
{
if(n !== null && n !== undefined)
{
return (n.toLocaleString());
}
else
{
return ("");
}
}
catch(e)
{
return (String(n));
}
}
public static breakTextIntoLines(value: string): JSX.Element
{