If a previous pathfinding job is done, reset it to undefined

This commit is contained in:
Manuel Vögele
2022-10-04 10:25:31 +02:00
parent 944ff96a26
commit 4957188630
+1
View File
@@ -126,6 +126,7 @@ export function extendRuler() {
this.pathfindingJob = pathfindingJob; this.pathfindingJob = pathfindingJob;
return this.pathfindingJob.then(result => { return this.pathfindingJob.then(result => {
if (pathfindingJob === this.pathfindingJob) { if (pathfindingJob === this.pathfindingJob) {
this.pathfindingJob = undefined;
this.addPathToWaypoints(result?.path); this.addPathToWaypoints(result?.path);
return this.performPostPathfindingActions(options); return this.performPostPathfindingActions(options);
} }