diff client/src/components/fairway/AvailableFairwayDepth.vue @ 3481:ba26adce0ce8

afd: robust legend name
author Thomas Junk <thomas.junk@intevation.de>
date Mon, 27 May 2019 15:54:35 +0200
parents cc11f207e060
children a303a746e471
line wrap: on
line diff
--- a/client/src/components/fairway/AvailableFairwayDepth.vue	Mon May 27 15:08:44 2019 +0200
+++ b/client/src/components/fairway/AvailableFairwayDepth.vue	Mon May 27 15:54:35 2019 +0200
@@ -206,7 +206,7 @@
     },
     csvFileName() {
       return `${this.$gettext("fairwayavailability")}-${
-        this.selectedFairwayAvailabilityFeature.properties.name
+        this.featureName
       }-${filters.surveyDate(this.fromDate)}-${filters.surveyDate(
         this.toDate
       )}-${this.$gettext(this.frequency)}-.csv`;
@@ -236,6 +236,7 @@
       )}) ${this.$gettext(this.frequency)}`;
     },
     featureName() {
+      if (this.selectedFairwayAvailabilityFeature == null) return "";
       return this.selectedFairwayAvailabilityFeature.properties.name;
     }
   },