@firebase/storage 0.9.13 → 0.9.14-canary.37dd6f6f4

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.
@@ -181,6 +181,9 @@ function serverFileWrongSize() {
181
181
  function noDownloadURL() {
182
182
  return new StorageError("no-download-url" /* NO_DOWNLOAD_URL */, 'The given file does not have any download URLs.');
183
183
  }
184
+ function missingPolyFill(polyFill) {
185
+ return new StorageError("unsupported-environment" /* UNSUPPORTED_ENVIRONMENT */, polyFill + " is missing. Make sure to install the required polyfills. See https://firebase.google.com/docs/web/environments-js-sdk#polyfills for more information.");
186
+ }
184
187
  /**
185
188
  * @internal
186
189
  */
@@ -946,6 +949,9 @@ function sliceBlob(blob, start, end) {
946
949
  */
947
950
  /** Converts a Base64 encoded string to a binary string. */
948
951
  function decodeBase64(encoded) {
952
+ if (typeof atob === 'undefined') {
953
+ throw missingPolyFill('base-64');
954
+ }
949
955
  return atob(encoded);
950
956
  }
951
957
 
@@ -1107,6 +1113,9 @@ function base64Bytes_(format, value) {
1107
1113
  bytes = decodeBase64(value);
1108
1114
  }
1109
1115
  catch (e) {
1116
+ if (e.message.includes('polyfill')) {
1117
+ throw e;
1118
+ }
1110
1119
  throw invalidFormat(format, 'Invalid character found');
1111
1120
  }
1112
1121
  var array = new Uint8Array(bytes.length);
@@ -3487,7 +3496,7 @@ var FirebaseStorageImpl = /** @class */ (function () {
3487
3496
  }());
3488
3497
 
3489
3498
  var name = "@firebase/storage";
3490
- var version = "0.9.13";
3499
+ var version = "0.9.14-canary.37dd6f6f4";
3491
3500
 
3492
3501
  /**
3493
3502
  * @license