Fix eslint failure (#1921)

## Description:

Fix an eslint failure blocking PRs from being merged.

## Please complete the following:

- [x] I have added screenshots for all UI updates
- [x] I process any text displayed to the user through translateText()
and I've added it to the en.json file
- [x] I have added relevant tests to the test directory
- [x] I confirm I have thoroughly tested these changes and take full
responsibility for any bugs introduced
This commit is contained in:
Scott Anderson
2025-08-24 17:23:11 -04:00
committed by GitHub
parent d752902dfe
commit de3e80154b
3 changed files with 7 additions and 6 deletions
@@ -9,7 +9,7 @@ import {
export class AllianceRequestExecution implements Execution {
private req: AllianceRequest | null = null;
private active = true;
private mg: Game;
private mg: Game | undefined;
constructor(
private readonly requestor: Player,
@@ -53,6 +53,7 @@ export class AllianceRequestExecution implements Execution {
this.active = false;
return;
}
if (this.mg === undefined) throw new Error("Not initialized");
if (
this.mg.ticks() - (this.req?.createdAt() ?? 0) >
this.mg.config().allianceRequestDuration()