Skip to content

Commit

Permalink
Merge pull request alibaba-fusion#883 from tao1991123/fix/upload-erro…
Browse files Browse the repository at this point in the history
…r-code

fix(Upload): errorcode in beforeUpload
  • Loading branch information
youluna authored Jul 18, 2019
2 parents e21df65 + 8faf398 commit 4b87e77
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/upload/runtime/uploader.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,14 @@ export default class Uploader {
);
},
error => {
this.options.onError(error, null, file);
let err;
if (error) {
err = error;
} else {
err = new Error(errorCode.BEFOREUPLOAD_REJECT);
err.code = errorCode.BEFOREUPLOAD_REJECT;
}
this.options.onError(err, null, file);
}
);
}
Expand Down

0 comments on commit 4b87e77

Please sign in to comment.