Skip to content

Commit 3cac155

Browse files
committed
Addressed comment
1 parent b0e6d57 commit 3cac155

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

packages/storage/src/task.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ export class UploadTask {
9494
private _metadataErrorHandler: (p1: StorageError) => void;
9595
private _resolve?: (p1: UploadTaskSnapshot) => void = undefined;
9696
private _reject?: (p1: StorageError) => void = undefined;
97-
private pendingTimeout: ReturnType<typeof setTimeout> | null = null;
97+
private pendingTimeout?: ReturnType<typeof setTimeout>;
9898
private _promise: Promise<UploadTaskSnapshot>;
9999

100100
private sleepTime: number;
@@ -193,7 +193,7 @@ export class UploadTask {
193193
this._fetchMetadata();
194194
} else {
195195
this.pendingTimeout = setTimeout(() => {
196-
this.pendingTimeout = null;
196+
this.pendingTimeout = undefined;
197197
this._continueUpload();
198198
}, this.sleepTime);
199199
}
@@ -416,7 +416,7 @@ export class UploadTask {
416416
this._request.cancel();
417417
} else if (this.pendingTimeout) {
418418
clearTimeout(this.pendingTimeout);
419-
this.pendingTimeout = null;
419+
this.pendingTimeout = undefined;
420420
this.completeTransitions_();
421421
}
422422
break;

0 commit comments

Comments
 (0)