bugfix: npe when winner is null

This commit is contained in:
Evan
2025-04-04 16:10:16 -07:00
parent 2cb8c239cf
commit b947b764b7
2 changed files with 5 additions and 5 deletions
+3 -3
View File
@@ -10,10 +10,10 @@ const log = logger.child({ component: "Archive" });
// R2 client configuration
const r2 = new S3({
region: "auto", // R2 ignores region, but it's required by the SDK
endpoint: config.r2Endpoint(), // You'll need to add this to your config
endpoint: config.r2Endpoint(),
credentials: {
accessKeyId: config.r2AccessKey(), // You'll need to add these
secretAccessKey: config.r2SecretKey(), // credential methods to your config
accessKeyId: config.r2AccessKey(),
secretAccessKey: config.r2SecretKey(),
},
});
+2 -2
View File
@@ -369,8 +369,8 @@ export class GameServer {
this.turns,
this._startTime,
Date.now(),
this.winner.winner,
this.winner.winnerType,
this.winner?.winner,
this.winner?.winnerType,
this.allPlayersStats,
),
);