Cope with percentages being missing.

This commit is contained in:
Simon MacMullen 2013-11-20 11:18:13 +00:00
parent 68b7bee91e
commit 7438ccd7f0
1 changed files with 5 additions and 1 deletions

View File

@ -200,7 +200,11 @@ function fmt_num_thousands(num) {
}
function fmt_percent(num) {
return Math.round(num * 100) + '%';
if (num === '') {
return 'N/A';
} else {
return Math.round(num * 100) + '%';
}
}
function fmt_rate(obj, name, mode) {