FIX: upload errors were sometimes not displayed properly (#10605)

FIX: upload errors were sometimes not displayed properly (#10605)

diff --git a/app/assets/javascripts/discourse/app/mixins/upload.js b/app/assets/javascripts/discourse/app/mixins/upload.js
index 4b6d98e..9bf7597 100644
--- a/app/assets/javascripts/discourse/app/mixins/upload.js
+++ b/app/assets/javascripts/discourse/app/mixins/upload.js
@@ -108,9 +108,7 @@ export default Mixin.create({
     });
 
     $upload.on("fileuploadfail", (e, data) => {
-      if (!data) {
-        displayErrorForUpload(data, this.siteSettings);
-      }
+      displayErrorForUpload(data, this.siteSettings);
       reset();
     });
   }),

GitHub sha: 21adc070

1 Like

This commit appears in #10605 which was approved by riking. It was merged by riking.