null check on warship target unit

This commit is contained in:
Evan
2025-03-07 10:25:31 -08:00
parent d1a54f84e0
commit 01b1a19cd7
+1 -1
View File
@@ -249,7 +249,7 @@ export class UnitLayer implements Layer {
const targetOwner = this.game
.units()
.find((u) => u.id() == unit.targetId())
.owner();
?.owner();
if (targetOwner == this.myPlayer) {
outerColor = colord({ r: 200, b: 0, g: 0 });
}