gluon-status-page: fix display of non-string values from respondd data

Fixes the display of client counts, which are numbers and not strings
in the respondd data.

Fixes: 3a885a1b22 ("gluon-status-page: make "gateway nexthop" a link (#2278)")
This commit is contained in:
Matthias Schiffer 2021-08-08 12:08:50 +02:00
parent 0d3fa6b59b
commit a357278464
No known key found for this signature in database
GPG Key ID: 16EF3F64CB201D9C
2 changed files with 3 additions and 4 deletions

File diff suppressed because one or more lines are too long

View File

@ -230,14 +230,13 @@
try {
var format_result = formats[format](value, valuePrev, diff);
switch (typeof format_result) {
case "string":
elem.textContent = format_result;
break;
case "object":
if (elem.lastChild)
elem.removeChild(elem.lastChild);
elem.appendChild(format_result);
break;
default:
elem.textContent = format_result;
}
} catch (e) {
console.error(e);