diff --git a/src/views/feature_type/Feature_type_detail.vue b/src/views/feature_type/Feature_type_detail.vue index a802d52f298f261c10450ede48dade83674ead41..ae9f110d5f192ae078a0456b0bed9a6ff9764fb7 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 () { @@ -392,19 +392,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));