Skip to content

Commit

Permalink
fix(xhr-uploader): rename abort event
Browse files Browse the repository at this point in the history
  • Loading branch information
huangjiaqi committed Jan 5, 2021
1 parent 353702b commit f894582
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/bom/xhr-upload.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export interface UploadRequestOption<T = any> {
onProgress?: (event: UploadProgressEvent) => void;
onError?: (event: UploadRequestError | ProgressEvent, body?: T) => void;
onSuccess?: (body: T, xhr: XMLHttpRequest) => void;
onabort?: (event: UploadRequestError | ProgressEvent) => void;
onAbort?: (event: UploadRequestError | ProgressEvent) => void;
data?: object;
filename?: string;
file: File;
Expand Down Expand Up @@ -97,7 +97,7 @@ export default function upload<T>(option: UploadRequestOption<T>) {
};

xhr.onabort = function error(e) {
option.onabort?.(e);
option.onAbort?.(e);
};

xhr.onload = function onload() {
Expand Down

0 comments on commit f894582

Please sign in to comment.