add case for when amount is undefined in formatCredits instead of returning 0 #317

Merged
clay53 merged 1 commit from master into master 2020-05-26 15:47:21 +02:00
2 changed files with 4 additions and 0 deletions

2
dist/bundle.es.js vendored
View file

@ -2665,6 +2665,8 @@ function numberWithCommas(x) {
}
function formatCredits(amount, precision, shortFormat = false) {
if (!amount) return '--';
let actualAmount = parseFloat(amount);
let actualPrecision = parseFloat(precision);
let suffix = '';

View file

@ -5,6 +5,8 @@ function numberWithCommas(x) {
}
export function formatCredits(amount, precision, shortFormat = false) {
if (!amount) return '--';
let actualAmount = parseFloat(amount);
let actualPrecision = parseFloat(precision);
let suffix = '';