improve format
This commit is contained in:
parent
a1e637fead
commit
3116b46a6c
|
|
@ -5,6 +5,8 @@ export function useNumberFormat() {
|
|||
const { i18n } = useTranslation();
|
||||
|
||||
return (number: number, digits = 2, currency = null) => {
|
||||
if(number == undefined)
|
||||
return null;
|
||||
if (currency) {
|
||||
if ((Math.round(number * (10 ** digits)) / (10 ** digits)) === 0)
|
||||
return "---";
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user