diff --git a/src/views/feature_type/Feature_type_detail.vue b/src/views/feature_type/Feature_type_detail.vue index ed3fbcca07cc9819c8321a0aceab468443915795..80e1e6eb516e735b21fd0cabc7c7ed37f8fd5b91 100644 --- a/src/views/feature_type/Feature_type_detail.vue +++ b/src/views/feature_type/Feature_type_detail.vue @@ -340,15 +340,15 @@ export default { exportFeatures() { const url = `${this.$store.state.configuration.VUE_APP_DJANGO_API_BASE}projects/${this.$route.params.slug}/feature-type/${this.$route.params.feature_type_slug}/export/`; - featureAPI - .getFeaturesBlob(url) - .then((blob) => { + featureAPI.getFeaturesBlob(url).then((blob) => { + if (blob) { const link = document.createElement("a"); link.href = URL.createObjectURL(blob); link.download = `${this.project.title}-${this.structure.title}.json`; link.click(); URL.revokeObjectURL(link.href); - }) + } + }); }, },