Skip to content

Commit

Permalink
Bugfix: Remove image card when trashed outside a property editor
Browse files Browse the repository at this point in the history
  • Loading branch information
loivsen committed Jun 25, 2024
1 parent f8ec6b7 commit fc1088f
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ export class UmbInputMediaElement extends UUIFormControlMixin(UmbLitElement, '')

this.observe(this.#pickerContext.selectedItems, async (selectedItems) => {
const missingCards = selectedItems.filter((item) => !this._cards.find((card) => card.unique === item.unique));
if (!missingCards.length) return;
if (selectedItems?.length && !missingCards.length) return;

if (!selectedItems?.length) {
this._cards = [];
Expand Down

0 comments on commit fc1088f

Please sign in to comment.