Skip to content

armgit / dashy

Public Imported from GitHub
0

πŸš€ A self-hostable personal dashboard built for you. Includes status-checking, widgets, themes, icon packs, a UI editor and tons more!

Use .revisedTime.local and .scheduledTime.local

Robert Nowotniake00a547d6f15
diff --git a/src/components/Widgets/Flights.vue b/src/components/Widgets/Flights.vue
index f292317f..7f930659 100644
--- a/src/components/Widgets/Flights.vue
+++ b/src/components/Widgets/Flights.vue
@@ -137,10 +137,12 @@ export default {
flights.forEach((flight) => {
results.push({
number: flight.number,
- airline: flight.airline.name,
- aircraft: flight.aircraft.model,
- airport: flight.movement.airport.name,
- time: flight.movement.actualTimeUtc,
+ airline: flight.airline?.name ?? "unknown airline",
+ aircraft: flight.aircraft?.model ?? "unknown aircraft",
+ airport: flight.movement?.airport?.name ?? "unknown airport",
+ time: flight.movement
+ ? (flight.movement?.revisedTime?.local ?? flight.movement?.scheduledTime?.local ?? "unknown time")
+ : "unknown time"
});
});
return results;