diff --git a/client/src/components/LiveLogView.tsx b/client/src/components/LiveLogView.tsx index c87e236..ab8638c 100644 --- a/client/src/components/LiveLogView.tsx +++ b/client/src/components/LiveLogView.tsx @@ -81,14 +81,16 @@ function hapticPulse() { function lastCourseFromEvents(events: LogEventPayload[]): string { for (let i = events.length - 1; i >= 0; i--) { - if (events[i].mgk.trim()) return events[i].mgk + const mgk = events[i].mgk?.trim() + if (mgk) return mgk } return '' } function lastWindDirectionFromEvents(events: LogEventPayload[]): string { for (let i = events.length - 1; i >= 0; i--) { - if (events[i].windDirection.trim()) return events[i].windDirection + const direction = events[i].windDirection?.trim() + if (direction) return direction } return '' } diff --git a/client/src/services/eventSeriesAggregation.ts b/client/src/services/eventSeriesAggregation.ts index 98bb2c2..5d980ff 100644 --- a/client/src/services/eventSeriesAggregation.ts +++ b/client/src/services/eventSeriesAggregation.ts @@ -71,21 +71,21 @@ export async function loadLogbookEventSeries(logbookId: string): Promise