tauri-app: fix end-of-game stats reading, pass raw json file to front
All checks were successful
record-daemon / Build, check and test (push) Successful in 2m6s
All checks were successful
record-daemon / Build, check and test (push) Successful in 2m6s
This commit is contained in:
@@ -53,9 +53,9 @@ function closeDetail() {
|
||||
function getLocalPlayer(stats: RawEndGameStats | null): EndGamePlayer | null {
|
||||
if (!stats) return null;
|
||||
|
||||
// Try local_player field first
|
||||
if (stats.local_player) {
|
||||
return stats.local_player;
|
||||
// Try localPlayer field first (camelCase from API)
|
||||
if (stats.localPlayer) {
|
||||
return stats.localPlayer;
|
||||
}
|
||||
|
||||
// Try teams
|
||||
@@ -63,7 +63,7 @@ function getLocalPlayer(stats: RawEndGameStats | null): EndGamePlayer | null {
|
||||
for (const team of stats.teams) {
|
||||
if (team.players) {
|
||||
for (const player of team.players) {
|
||||
if (player.is_local_player) {
|
||||
if (player.isLocalPlayer) {
|
||||
return player;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user