Skip to content

Commit 8606a34

Browse files
authored
Merge pull request #2042 from umbraco/v14/bugfix/remove-image-card-when-trashed-outside-property-editor
Bugfix: Remove image card when trashed outside a property editor
2 parents f8ec6b7 + fc1088f commit 8606a34

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/packages/media/media/components/input-media/input-media.element.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ export class UmbInputMediaElement extends UUIFormControlMixin(UmbLitElement, '')
141141

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

146146
if (!selectedItems?.length) {
147147
this._cards = [];

0 commit comments

Comments
 (0)