Skip to content

Commit 85e9120

Browse files
committed
fix(foxy-downloadable-form): allow re-uploads with the same file name
1 parent 7678b53 commit 85e9120

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

src/elements/public/DownloadableForm/internal/InternalDownloadableFormUploadControl/InternalDownloadableFormUploadControl.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -124,8 +124,6 @@ export class InternalDownloadableFormUploadControl extends InternalControl {
124124
const files = upload.files;
125125
if (files.length > 1) upload.files = [upload.files[0]];
126126
if (files[0]?.complete && !files[0].status) files[0].status = this.t('status_complete');
127-
128-
const newName = upload.files[0]?.name ?? '';
129-
if (newName !== nucleon?.form.file_name) nucleon?.edit({ file_name: newName });
127+
nucleon?.edit({ file_name: upload.files[0]?.name ?? '' });
130128
}
131129
}

0 commit comments

Comments
 (0)