Skip to content

Commit

Permalink
fix(uploader): xhrBeforeUpload判断错误 (#2507)
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex-huxiyang authored Aug 2, 2024
1 parent 40daef4 commit 5511672
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/packages/uploader/upload.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,12 @@ export class UploaderTaro extends Upload {

uploadTaro(uploadFile: any, env: string) {
const options = this.options
if (options.beforeXhrUpload) {
options.beforeXhrUpload(uploadFile, options)
return
}
if (env === 'WEB') {
this.upload()
} else if (options.beforeXhrUpload) {
options.beforeXhrUpload(uploadFile, options)
} else {
const uploadTask = uploadFile({
url: options.url,
Expand Down

0 comments on commit 5511672

Please sign in to comment.