From 7386e9f8cbb8506119885f44efa6d1404a1f04fe Mon Sep 17 00:00:00 2001 From: oOHiyoriOo Date: Sat, 13 Jun 2026 18:48:29 +0200 Subject: [PATCH] fix: player info page shows 'not connected' for online players MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit SteamID from RCON JSON is parsed as a Number, but the URL param from the regex match is a string. Strict === comparison always fails. Changed to String() coercion so types match. Also fixes subtle issue with large SteamID64 values exceeding MAX_SAFE_INTEGER — string comparison avoids precision loss. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- js/pages/playerInfo.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/pages/playerInfo.js b/js/pages/playerInfo.js index 7108476..9347542 100644 --- a/js/pages/playerInfo.js +++ b/js/pages/playerInfo.js @@ -31,7 +31,7 @@ function PlayerInfoPage(params, container) { Rcon.getPlayers(function (players) { var info = null; for (var i = 0; i < players.length; i++) { - if (players[i].SteamID === userid) { info = players[i]; break; } + if (String(players[i].SteamID) === userid) { info = players[i]; break; } } if (!info) {