Cope with percentages being missing.
This commit is contained in:
parent
68b7bee91e
commit
7438ccd7f0
|
|
@ -200,8 +200,12 @@ function fmt_num_thousands(num) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function fmt_percent(num) {
|
function fmt_percent(num) {
|
||||||
|
if (num === '') {
|
||||||
|
return 'N/A';
|
||||||
|
} else {
|
||||||
return Math.round(num * 100) + '%';
|
return Math.round(num * 100) + '%';
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function fmt_rate(obj, name, mode) {
|
function fmt_rate(obj, name, mode) {
|
||||||
var raw = fmt_rate0(obj, name, mode, fmt_rate_num);
|
var raw = fmt_rate0(obj, name, mode, fmt_rate_num);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue