Skip to content
This repository was archived by the owner on Dec 18, 2025. It is now read-only.

Commit 5ba731c

Browse files
committed
Fixed typos
1 parent 6d2bfdd commit 5ba731c

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/ajax.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -210,12 +210,11 @@ class Ajax<T> extends Events {
210210
* @param onprogress - The progress callback.
211211
* @returns A promise that resolves with the response.
212212
*/
213-
promisify(onprogress: (progress: number) => void) {
213+
promisify(onprogress?: (progress: number) => void) {
214214
this.unbind('progress');
215215
if (onprogress) {
216216
this.on('progress', onprogress);
217217
}
218-
this.on('progress', onprogress);
219218
return new Promise<T>((resolve, reject) => {
220219
this.once('load', (_status, response: T) => {
221220
resolve(response);

0 commit comments

Comments
 (0)