mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-07-18 00:19:17 +00:00
Enable the @typescript-eslint/no-non-null-assertion eslint rule (#1899)
## Description: Enable the `@typescript-eslint/no-non-null-assertion` eslint rule. ## 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:
@@ -452,11 +452,7 @@ export class ClientGameRunner {
|
||||
return;
|
||||
}
|
||||
|
||||
this.findAndUpgradeNearestBuilding(tile);
|
||||
}
|
||||
|
||||
private findAndUpgradeNearestBuilding(clickedTile: TileRef) {
|
||||
this.myPlayer!.actions(clickedTile).then((actions) => {
|
||||
this.myPlayer.actions(tile).then((actions) => {
|
||||
const upgradeUnits: {
|
||||
unitId: number;
|
||||
unitType: UnitType;
|
||||
@@ -470,7 +466,7 @@ export class ClientGameRunner {
|
||||
.find((unit) => unit.id() === bu.canUpgrade);
|
||||
if (existingUnit) {
|
||||
const distance = this.gameView.manhattanDist(
|
||||
clickedTile,
|
||||
tile,
|
||||
existingUnit.tile(),
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user