Skip to content

Commit ed3eccc

Browse files
committed
fix: calculate a preview alias only when the 'src' field has changed
1 parent c98eca0 commit ed3eccc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ export class UmbInputUploadFieldElement extends UmbLitElement {
7373

7474
override updated(changedProperties: PropertyValueMap<any> | Map<PropertyKey, unknown>) {
7575
super.updated(changedProperties);
76-
if (changedProperties.has('value')) {
76+
if (changedProperties.has('value') && changedProperties.get('value')?.src !== this.value.src) {
7777
this.#setPreviewAlias();
7878
}
7979
}

0 commit comments

Comments
 (0)