Skip to content

Commit

Permalink
fix: lint error
Browse files Browse the repository at this point in the history
  • Loading branch information
sheepluo committed Nov 5, 2023
1 parent 35fc954 commit 56f3acd
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions js/upload/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ export function handleError(options: OnErrorParams) {
file.status = 'fail';
file.response = res;
});

return { response: res, event, files, XMLHttpRequest };
}

Expand Down Expand Up @@ -149,7 +148,7 @@ export function uploadOneRequest(params: HandleUploadParams): Promise<UploadRequ
resolve({});
return;
}
let response = res.response as ResponseType;
let response = (res.response || {}) as ResponseType;
if (isFunction(params.formatResponse)) {
response = params.formatResponse(response, { file: toUploadFiles[0], currentFiles: toUploadFiles });
if (response.status === 'success' && !response.files) {
Expand Down

0 comments on commit 56f3acd

Please sign in to comment.