From a9667bdea2026d552a381d880949c395563ce646 Mon Sep 17 00:00:00 2001 From: oOHiyoriOo Date: Sat, 13 Jun 2026 18:54:16 +0200 Subject: [PATCH] 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> --- js/pages/playerInfo.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/js/pages/playerInfo.js b/js/pages/playerInfo.js index 4594562..d8d206f 100644 --- a/js/pages/playerInfo.js +++ b/js/pages/playerInfo.js @@ -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 += '

' + key + ': ' + value + '

'; }