diff --git a/packages/rocketchat-ui/client/lib/fileUpload.js b/packages/rocketchat-ui/client/lib/fileUpload.js index 9c20385e3021..7a2d97de4ff7 100644 --- a/packages/rocketchat-ui/client/lib/fileUpload.js +++ b/packages/rocketchat-ui/client/lib/fileUpload.js @@ -135,7 +135,7 @@ fileUpload = function(filesToUpload) { html: true }, function(isConfirm) { consume(); - if (isConfirm !== true) { + if (!isConfirm) { return; } @@ -175,10 +175,10 @@ fileUpload = function(filesToUpload) { uploading = []; } - const item = _.findWhere(uploading, { id: this.id }); + const item = _.findWhere(uploading, { id: upload.id }); if (_.isObject(item)) { - item.error = error.error; + item.error = error.message; item.percentage = 0; } else { uploading.push({