mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-06-24 13:14:45 +00:00
Added a cancellation check
This commit is contained in:
@@ -174,10 +174,14 @@ export class GhostStructureManager {
|
||||
}
|
||||
}
|
||||
|
||||
const currentGhost = this.ghostUnit;
|
||||
this.game
|
||||
.myPlayer()
|
||||
?.actions(tileRef)
|
||||
.then((actions) => {
|
||||
// Check if ghost is still valid and hasn't changed
|
||||
if (!this.ghostUnit || this.ghostUnit !== currentGhost) return;
|
||||
|
||||
// Clear previous highlights/filters
|
||||
this.onHighlightUpgrade(null);
|
||||
if (this.ghostUnit?.container) {
|
||||
|
||||
Reference in New Issue
Block a user