Improves check for mutivalued metadata update in the form item.

This commit is contained in:
mateuswetah 2024-03-14 15:32:17 -03:00
parent c4ea79c406
commit 5394bc810c
1 changed files with 4 additions and 2 deletions

View File

@ -286,7 +286,6 @@
this.performValueChange(); this.performValueChange();
}, 800), }, 800),
performValueChange() { performValueChange() {
// Compound metadata do not emit values, only their children. // Compound metadata do not emit values, only their children.
if (this.metadatumComponent == 'tainacan-compound') if (this.metadatumComponent == 'tainacan-compound')
return; return;
@ -326,7 +325,10 @@
// A single term value // A single term value
case 'Object': 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; return;
break; break;