mirror of
https://github.com/Kingsrook/qqq-frontend-material-dashboard.git
synced 2025-07-18 21:30:45 +00:00
Try to avoid errors formatting non-numbers
This commit is contained in:
@ -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
|
||||
{
|
||||
|
Reference in New Issue
Block a user