Skip to content

Commit

Permalink
probably fix issue where block endpoint would break when pilot had no…
Browse files Browse the repository at this point in the history
… runway assigned
  • Loading branch information
dotFionn committed Apr 27, 2024
1 parent d04b3e5 commit 7d5f2ff
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions backend/src/controllers/airport.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,10 @@ export async function getAirportBlocks(req: Request, res: Response, next: NextFu
});

for (let pilot of pilots) {
if (!pilot?.vacdm?.block_rwy_designator || !pilot?.vacdm?.blockId) {
continue;
}

blocksPilot.rwys[pilot.vacdm.block_rwy_designator][pilot.vacdm.blockId].push(pilot);
}

Expand Down

0 comments on commit 7d5f2ff

Please sign in to comment.