Skip to content

Commit

Permalink
fix: No error shown when image upload fails (#5595)
Browse files Browse the repository at this point in the history
Co-authored-by: Areeb Jamal <jamal.areeb@gmail.com>
  • Loading branch information
akash2408 and iamareebjamal authored Nov 13, 2020
1 parent ed2dd18 commit 2ff1f35
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/components/widgets/forms/image-upload.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,9 @@ export default class ImageUpload extends Component {
})
.catch(e => {
console.error('Error while uploading and setting image URL', e);
this.notify.error(this.l10n.t('An unexpected error has occurred.'));
this.set('uploadingImage', false);
this.set('errorMessage', this.i18n.t('An unexpected error has occurred.'));
this.set('selectedImage', null);
});
}

Expand Down

1 comment on commit 2ff1f35

@vercel
Copy link

@vercel vercel bot commented on 2ff1f35 Nov 13, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.