Skip to content

Commit

Permalink
Revert "chore: fix issue with images being deleted after edit"
Browse files Browse the repository at this point in the history
This reverts commit d1bf23c.
  • Loading branch information
DavideIadeluca committed Mar 15, 2024
1 parent 16d2038 commit 7ab5b79
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions js/src/forum/components/UploadPollImageButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export interface UploadPollImageButtonAttrs extends IButtonAttrs {
name: string;
onclick: () => void;
poll?: Poll | null;
onUpload: (fileName: string) => void;
onUpload: (fileName: string | null | undefined) => void;
}

export interface PollUploadObject {
Expand Down Expand Up @@ -106,7 +106,7 @@ export default class UploadPollImageButton extends Button<UploadPollImageButtonA
* @param {PollUploadObject} response
* @protected
*/
success(response: PollUploadObject) {
success(response: PollUploadObject | null) {
this.loading = false;
this.uploadedImageUrl = response?.fileUrl;
this.fileName = response?.fileName;
Expand Down

0 comments on commit 7ab5b79

Please sign in to comment.