diff --git a/src/exports/attachment-manager.ts b/src/exports/attachment-manager.ts index 9900f3ce..cdebf52d 100644 --- a/src/exports/attachment-manager.ts +++ b/src/exports/attachment-manager.ts @@ -133,9 +133,10 @@ export class AttachmentManager implements AttachmentManagerAttributes { } handleSuccess() { + this.setUploadProgress(100); const upload = this.directUpload; + if (upload) { - this.setUploadProgress(100); upload.element.dispatchEvent(new AttachmentUploadSucceedEvent(upload)); upload.element.dispatchEvent(new AttachmentUploadCompleteEvent(upload)); }