diff --git a/src/views/feature_type/Feature_type_detail.vue b/src/views/feature_type/Feature_type_detail.vue index 56f8495e9683024de0e538b11024c038b1020bae..483bd3beffc3137ae7b81394703d0beb0e3e8cc8 100644 --- a/src/views/feature_type/Feature_type_detail.vue +++ b/src/views/feature_type/Feature_type_detail.vue @@ -258,7 +258,7 @@ export default { (el) => el.slug === this.$route.params.feature_type_slug ); } - return null; + return {}; }, feature_type_features: function () { @@ -391,19 +391,21 @@ export default { } } }, - // watch:{ - // 'feature_type_features'(newValue){ - // console.log(newValue) - // if (newValue){ - // this.featuresLoading = false; - // } - // } - // }, + watch:{ + 'structure'(newValue){ + console.log(newValue) + if (newValue){ + this.$store.dispatch("feature_type/GET_IMPORTS", this.structure.slug); + } + } + }, created() { if (!this.project) { this.$store.dispatch("GET_PROJECT_INFO", this.$route.params.slug); } - this.$store.dispatch("feature_type/GET_IMPORTS", this.structure.slug); + // if (this.structure) { + // this.$store.dispatch("feature_type/GET_IMPORTS", this.structure.slug); + // } this.setCurrentFeatureTypeSlug(); // .then(res => resolve(res)) // .catch(err => reject(err));