diff --git a/webapp/src/components/CollectionSelect.vue b/webapp/src/components/CollectionSelect.vue index 2e3341d7e..7f50cccef 100644 --- a/webapp/src/components/CollectionSelect.vue +++ b/webapp/src/components/CollectionSelect.vue @@ -75,10 +75,12 @@ export default { }, }, collectionOrNewCollection() { + const valueSafe = Array.isArray(this.value) ? this.value : []; + if ( this.searchQuery && !this.collections.some((item) => item.collection_id === this.searchQuery) && - !this.value.some((item) => item.collection_id === this.searchQuery) + !valueSafe.some((item) => item.collection_id === this.searchQuery) ) { return [ ...this.collections,