Fix marking of non-marked waypoints.

This commit is contained in:
Dan Albert 2022-03-07 18:10:04 -08:00
parent cf7c7d853f
commit a6a44ef433

View File

@ -48,14 +48,16 @@ const WaypointMarkers = (props: FlightPlanProps) => {
var markers: ReactElement[] = [];
props.flight.waypoints?.forEach((p, idx) => {
markers.push(
<WaypointMarker
key={idx}
number={idx}
waypoint={p}
flight={props.flight}
/>
);
if (p.should_mark) {
markers.push(
<WaypointMarker
key={idx}
number={idx}
waypoint={p}
flight={props.flight}
/>
);
}
});
return <>{markers}</>;