diff --git a/src/renderer/components/AirlineItem.vue b/src/renderer/components/AirlineItem.vue index 8038296..507cf06 100644 --- a/src/renderer/components/AirlineItem.vue +++ b/src/renderer/components/AirlineItem.vue @@ -10,10 +10,10 @@ FG Airports is distributed in the hope that it will be useful, but WITHOUT ANY W You should have received a copy of the GNU General Public License along with FG Airports. If not, see http://www.gnu.org/licenses/. --> @@ -74,8 +74,9 @@ export default { }, {}) var ret = this.trafficFile.filter(f => f.callsign).filter(f => (f.departure.port === this.$store.state.Airports.currentAirport.icao && this.direction === 0) || - (f.arrival.port === this.$store.state.Airports.currentAirport.icao && this.direction === 1) - ).map(obj => ({ ...obj, flighttype: aircraftLookup[obj['required-aircraft']].flighttype })) + (f.arrival.port === this.$store.state.Airports.currentAirport.icao && this.direction === 1)) + .map(obj => ({ ...obj, flighttype: aircraftLookup[obj['required-aircraft']].flighttype })) + .filter((v, i, a) => a.findIndex(t => (t.id === v.id)) === i) return ret } }, diff --git a/src/renderer/components/TrafficList.vue b/src/renderer/components/TrafficList.vue index 08c6103..362086d 100644 --- a/src/renderer/components/TrafficList.vue +++ b/src/renderer/components/TrafficList.vue @@ -81,7 +81,7 @@ You should have received a copy of the GNU General Public License along with FG airlineCodes.push({value: element, label: element}) }) } - return airlineCodes + return airlineCodes.filter((v, i, a) => a.indexOf(v) === i) } } }