From b3c92aab4bef5211071d5c87e8ec35196f71088a Mon Sep 17 00:00:00 2001 From: SpacialCircumstances Date: Sat, 6 Jul 2024 11:21:02 +0200 Subject: [PATCH] Fix waypoints saving crashing --- server/services/waypoint.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/services/waypoint.ts b/server/services/waypoint.ts index 47c538ff5..f8b6d6641 100644 --- a/server/services/waypoint.ts +++ b/server/services/waypoint.ts @@ -93,7 +93,7 @@ export default class WaypointService { if (+newFirstWaypoint.delayTicks) { throw new ValidationError('The first waypoint cannot have delay ticks if mid-flight.'); } - } else { + } else if (waypoints?.length > 0) { if (carrier.orbiting.toString() !== waypoints[0].source.toString()) { throw new ValidationError('The source star does not match the carrier location.'); }