File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed
Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change 55 Live {{ direction !== 'both' ? direction: 'flight' }} data from {{ airport }}
66 </p >
77 <!-- Departures -->
8- <div v-if =" departures.length > 0" class =" flight-group" >
8+ <div v-if =" direction !== 'arrival' && departures.length > 0" class =" flight-group" >
99 <h3 class =" flight-type-subtitle" v-if =" direction === 'both'" >
1010 {{ $t('widgets.flight-data.departures') }}
1111 </h3 >
1616 </div >
1717 </div >
1818 <!-- Arrivals -->
19- <div v-if =" arrivals.length > 0" class =" flight-group" >
19+ <div v-if =" direction !== 'departure' && arrivals.length > 0" class =" flight-group" >
2020 <h3 class =" flight-type-subtitle" v-if =" direction === 'both'" >
2121 {{ $t('widgets.flight-data.arrivals') }}
2222 </h3 >
@@ -137,10 +137,12 @@ export default {
137137 flights .forEach ((flight ) => {
138138 results .push ({
139139 number: flight .number ,
140- airline: flight .airline .name ,
141- aircraft: flight .aircraft .model ,
142- airport: flight .movement .airport .name ,
143- time: flight .movement .actualTimeUtc ,
140+ airline: flight .airline ? .name ?? " unknown airline" ,
141+ aircraft: flight .aircraft ? .model ?? " unknown aircraft" ,
142+ airport: flight .movement ? .airport ? .name ?? " unknown airport" ,
143+ time: flight .movement
144+ ? (flight .movement ? .revisedTime ? .local ?? flight .movement ? .scheduledTime ? .local ?? " unknown time" )
145+ : " unknown time"
144146 });
145147 });
146148 return results;
You can’t perform that action at this time.
0 commit comments