fix: player info page shows 'not connected' for online players

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>
This commit is contained in:
2026-06-13 18:48:29 +02:00
co-authored by Copilot
parent d45ca5c67a
commit 7386e9f8cb
+1 -1
View File
@@ -31,7 +31,7 @@ function PlayerInfoPage(params, container) {
Rcon.getPlayers(function (players) { Rcon.getPlayers(function (players) {
var info = null; var info = null;
for (var i = 0; i < players.length; i++) { 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) { if (!info) {