From 5394bc810c6e225aaad2058439e9c95cc3b4bc00 Mon Sep 17 00:00:00 2001 From: mateuswetah Date: Thu, 14 Mar 2024 15:32:17 -0300 Subject: [PATCH] Improves check for mutivalued metadata update in the form item. --- .../admin/components/metadata-types/tainacan-form-item.vue | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/views/admin/components/metadata-types/tainacan-form-item.vue b/src/views/admin/components/metadata-types/tainacan-form-item.vue index d8c0ff08f..7f9a8f43c 100644 --- a/src/views/admin/components/metadata-types/tainacan-form-item.vue +++ b/src/views/admin/components/metadata-types/tainacan-form-item.vue @@ -286,7 +286,6 @@ this.performValueChange(); }, 800), performValueChange() { - // Compound metadata do not emit values, only their children. if (this.metadatumComponent == 'tainacan-compound') return; @@ -326,7 +325,10 @@ // A single term value case 'Object': - if (this.values.length && this.values[0] == this.itemMetadatum.value.id) + if ( + ( Array.isArray(this.values) && this.values.length && this.values[0] == this.itemMetadatum.value.id ) || + ( this.values == this.itemMetadatum.value.id ) + ) return; break;