changeset 3481:ba26adce0ce8

afd: robust legend name
author Thomas Junk <thomas.junk@intevation.de>
date Mon, 27 May 2019 15:54:35 +0200
parents afab8d87932c
children 1f8ee1366859
files client/src/components/fairway/AvailableFairwayDepth.vue
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
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;
     }
   },