Skip to content

Commit

Permalink
Merge pull request #7230 from RocketChat/fix-closing-file-upload-errors
Browse files Browse the repository at this point in the history
[FIX] Fixes scope error preventing file upload errors from being dismissed
  • Loading branch information
rodrigok committed Jun 30, 2017
2 parents 52b8cec + ec85fbb commit e40379b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/rocketchat-ui/client/lib/fileUpload.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ fileUpload = function(filesToUpload) {
html: true
}, function(isConfirm) {
consume();
if (isConfirm !== true) {
if (!isConfirm) {
return;
}

Expand Down Expand Up @@ -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({
Expand Down

0 comments on commit e40379b

Please sign in to comment.