diff --git a/src/views/admin/components/metadata-types/taxonomy/Taxonomy.vue b/src/views/admin/components/metadata-types/taxonomy/Taxonomy.vue index 3f626572f..f255d94bc 100644 --- a/src/views/admin/components/metadata-types/taxonomy/Taxonomy.vue +++ b/src/views/admin/components/metadata-types/taxonomy/Taxonomy.vue @@ -155,9 +155,10 @@ methods: { getTermsId() { let values = []; + if (this.value && this.itemMetadatum.metadatum && this.getComponent != 'tainacan-taxonomy-tag-input') { values = this.value.map(term => term.id).filter(term => term !== undefined); - this.valueComponent = (values.length >= 0 && this.itemMetadatum.metadatum && this.itemMetadatum.metadatum.multiple === 'no') ? values[0] : values; + this.valueComponent = (values.length > 0 && this.itemMetadatum.metadatum && this.itemMetadatum.metadatum.multiple === 'no') ? values[0] : values; } else if (this.value && this.itemMetadatum.metadatum && this.getComponent == 'tainacan-taxonomy-tag-input') { values = this.value.map((term) => { return { label: term.name, value: term.id } }); this.valueComponent = values;