@@ -1,5 +1,5 @@
export function formatter(num){
- if(isNaN(num)) return 0;
+ if(isNaN(num) || !num) return 0;
let n = num.toString().split(".");
let number = n[0].replace(/\B(?=(\d{3})+(?!\d))/g, ',');
if(n[1]) number = number + '.' + n[1];