Skip to content

Commit

Permalink
Fix this.value == null inside CreateItemModal insert into collection
Browse files Browse the repository at this point in the history
  • Loading branch information
BenjaminCharmes committed Sep 25, 2024
1 parent f7c5550 commit e09133f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion webapp/src/components/CollectionSelect.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit e09133f

Please sign in to comment.