From e4ccab21c2e0532c5acf3b8ba758c695818a5a0e Mon Sep 17 00:00:00 2001 From: leandro <leandroalmada86@gmail.com> Date: Mon, 6 Dec 2021 14:37:57 +0100 Subject: [PATCH] fix structure undefined --- .../feature_type/Feature_type_detail.vue | 22 ++++++++++--------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/src/views/feature_type/Feature_type_detail.vue b/src/views/feature_type/Feature_type_detail.vue index 56f8495e..483bd3be 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)); -- GitLab