diff options
Diffstat (limited to 'nodejs/lib/ships.ts')
-rw-r--r-- | nodejs/lib/ships.ts | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/nodejs/lib/ships.ts b/nodejs/lib/ships.ts index ff38164..74419fc 100644 --- a/nodejs/lib/ships.ts +++ b/nodejs/lib/ships.ts @@ -103,7 +103,7 @@ export class Ship { return this.cargo.units >= this.cargo.capacity * 0.9; } async navigate(waypoint: Waypoint): Promise<void> { - let path = shortestPath(await libSystems.waypoint(this.nav.route.destination.symbol), waypoint, this.fuel.capacity, await libSystems.waypoints(this.nav.systemSymbol)); + let path = await shortestPath(await libSystems.waypoint(this.nav.route.destination.symbol), waypoint, this.fuel.capacity, await libSystems.waypoints(this.nav.systemSymbol)); while (path.length > 0) { const next = path.pop(); if (next === undefined) break; |