From 05318a77829a34b62651d93d63e56a2775ecadce Mon Sep 17 00:00:00 2001 From: portree_kid Date: Sat, 11 Apr 2020 21:52:44 +0200 Subject: [PATCH] NPE --- src/renderer/components/AirportEdit.vue | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/renderer/components/AirportEdit.vue b/src/renderer/components/AirportEdit.vue index 885b00a..5d3e9e5 100644 --- a/src/renderer/components/AirportEdit.vue +++ b/src/renderer/components/AirportEdit.vue @@ -68,10 +68,12 @@ }, airlines: function () { var airlineCodes = [] - var storedairlineCodes = this.$store.state.Airports.currentAirport.airlines - storedairlineCodes.forEach(element => { - airlineCodes.push({value: element, label: element}) - }) + if (this.$store.state.Airports.currentAirport !== undefined) { + var storedairlineCodes = this.$store.state.Airports.currentAirport.airlines + storedairlineCodes.forEach(element => { + airlineCodes.push({value: element, label: element}) + }) + } return airlineCodes }, groundnet: function () {