fix: player Position field showing [object Object]

Rust RCON returns Position as {x, y, z} object. Now formatted as
'x:123.4 y:56.7 z:89.0' instead of the default toString() garbage.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
2026-06-13 18:54:16 +02:00
co-authored by Copilot
parent 5f25974cf2
commit a9667bdea2
+3
View File
@@ -62,6 +62,9 @@ function PlayerInfoPage(params, container) {
var value = info[key];
if (key === 'Address') {
value = maskIp(value);
} else if (typeof value === 'object' && value !== null) {
// e.g. Position: {x, y, z}
value = 'x:' + (value.x || 0).toFixed(1) + ' y:' + (value.y || 0).toFixed(1) + ' z:' + (value.z || 0).toFixed(1);
}
fieldsHtml += '<div class="col-sm-4"><p>' + key + ': <span class="badge">' + value + '</span></p></div>';
}