@firebase/storage 0.9.11 → 0.9.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2378,7 +2378,8 @@ class UploadTask {
2378
2378
  this._fetchMetadata();
2379
2379
  }
2380
2380
  else {
2381
- setTimeout(() => {
2381
+ this.pendingTimeout = setTimeout(() => {
2382
+ this.pendingTimeout = undefined;
2382
2383
  this._continueUpload();
2383
2384
  }, this.sleepTime);
2384
2385
  }
@@ -2522,6 +2523,7 @@ class UploadTask {
2522
2523
  }
2523
2524
  switch (state) {
2524
2525
  case "canceling" /* CANCELING */:
2526
+ case "pausing" /* PAUSING */:
2525
2527
  // TODO(andysoto):
2526
2528
  // assert(this.state_ === InternalTaskState.RUNNING ||
2527
2529
  // this.state_ === InternalTaskState.PAUSING);
@@ -2529,13 +2531,10 @@ class UploadTask {
2529
2531
  if (this._request !== undefined) {
2530
2532
  this._request.cancel();
2531
2533
  }
2532
- break;
2533
- case "pausing" /* PAUSING */:
2534
- // TODO(andysoto):
2535
- // assert(this.state_ === InternalTaskState.RUNNING);
2536
- this._state = state;
2537
- if (this._request !== undefined) {
2538
- this._request.cancel();
2534
+ else if (this.pendingTimeout) {
2535
+ clearTimeout(this.pendingTimeout);
2536
+ this.pendingTimeout = undefined;
2537
+ this.completeTransitions_();
2539
2538
  }
2540
2539
  break;
2541
2540
  case "running" /* RUNNING */:
@@ -3351,7 +3350,7 @@ class FirebaseStorageImpl {
3351
3350
  }
3352
3351
 
3353
3352
  const name = "@firebase/storage";
3354
- const version = "0.9.11";
3353
+ const version = "0.9.12";
3355
3354
 
3356
3355
  /**
3357
3356
  * @license