Skip to content

Commit 5ee22fe

Browse files
committed
chore: onStart always in sync
1 parent 953e36a commit 5ee22fe

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

.prettierrc

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,6 @@
22
"singleQuote": true,
33
"trailingComma": "all",
44
"proseWrap": "never",
5-
"printWidth": 100
5+
"printWidth": 100,
6+
"arrowParens": "avoid"
67
}

src/AjaxUploader.tsx

+2-1
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,8 @@ class AjaxUploader extends Component<UploadProps> {
135135
const { props } = this;
136136
const { onStart, onProgress, transformFile = originFile => originFile } = props;
137137

138+
onStart(file);
139+
138140
new Promise(resolve => {
139141
let { action } = props;
140142
if (typeof action === 'function') {
@@ -180,7 +182,6 @@ class AjaxUploader extends Component<UploadProps> {
180182
},
181183
};
182184

183-
onStart(file);
184185
this.reqs[uid] = request(requestOption);
185186
});
186187
});

0 commit comments

Comments
 (0)