Skip to content

Commit

Permalink
Merge pull request #2042 from umbraco/v14/bugfix/remove-image-card-wh…
Browse files Browse the repository at this point in the history
…en-trashed-outside-property-editor

Bugfix: Remove image card when trashed outside a property editor
  • Loading branch information
leekelleher authored Jun 25, 2024
2 parents f8ec6b7 + fc1088f commit 8606a34
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 8606a34

Please sign in to comment.