gluon-status-page: when prettifying undefined numbers, show - instead of NaN

This commit is contained in:
Christof Schulze 2018-04-16 08:48:06 +02:00 committed by Matthias Schiffer
parent 62943f9ca1
commit 2465a103f6
No known key found for this signature in database
GPG Key ID: 16EF3F64CB201D9C
2 changed files with 4 additions and 1 deletions

File diff suppressed because one or more lines are too long

View File

@ -39,6 +39,9 @@
function prettyPrefix(prefixes, step, d) { function prettyPrefix(prefixes, step, d) {
var prefix = 0; var prefix = 0;
if (d === undefined)
return "- ";
while (d > step && prefix < prefixes.length - 1) { while (d > step && prefix < prefixes.length - 1) {
d /= step; d /= step;
prefix++; prefix++;