mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-06-21 16:56:36 +00:00
validates coordinates in onMouseUp
This commit is contained in:
@@ -118,6 +118,9 @@ export class UnitLayer implements Layer {
|
||||
event.x,
|
||||
event.y,
|
||||
);
|
||||
if (!this.game.isValidCoord(cell.x, cell.y)) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Find warships near this cell, sorted by distance
|
||||
const nearbyWarships = this.findWarshipsNearCell(cell);
|
||||
|
||||
Reference in New Issue
Block a user