@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.
@@ -2348,7 +2348,8 @@ class UploadTask {
2348
2348
  this._fetchMetadata();
2349
2349
  }
2350
2350
  else {
2351
- setTimeout(() => {
2351
+ this.pendingTimeout = setTimeout(() => {
2352
+ this.pendingTimeout = undefined;
2352
2353
  this._continueUpload();
2353
2354
  }, this.sleepTime);
2354
2355
  }
@@ -2492,6 +2493,7 @@ class UploadTask {
2492
2493
  }
2493
2494
  switch (state) {
2494
2495
  case "canceling" /* CANCELING */:
2496
+ case "pausing" /* PAUSING */:
2495
2497
  // TODO(andysoto):
2496
2498
  // assert(this.state_ === InternalTaskState.RUNNING ||
2497
2499
  // this.state_ === InternalTaskState.PAUSING);
@@ -2499,13 +2501,10 @@ class UploadTask {
2499
2501
  if (this._request !== undefined) {
2500
2502
  this._request.cancel();
2501
2503
  }
2502
- break;
2503
- case "pausing" /* PAUSING */:
2504
- // TODO(andysoto):
2505
- // assert(this.state_ === InternalTaskState.RUNNING);
2506
- this._state = state;
2507
- if (this._request !== undefined) {
2508
- this._request.cancel();
2504
+ else if (this.pendingTimeout) {
2505
+ clearTimeout(this.pendingTimeout);
2506
+ this.pendingTimeout = undefined;
2507
+ this.completeTransitions_();
2509
2508
  }
2510
2509
  break;
2511
2510
  case "running" /* RUNNING */:
@@ -3304,7 +3303,7 @@ class FirebaseStorageImpl {
3304
3303
  }
3305
3304
 
3306
3305
  const name = "@firebase/storage";
3307
- const version = "0.9.11";
3306
+ const version = "0.9.12";
3308
3307
 
3309
3308
  /**
3310
3309
  * @license