web-streams-polyfill 3.2.0 → 3.2.1

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.
package/dist/polyfill.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * web-streams-polyfill v3.2.0
2
+ * web-streams-polyfill v3.2.1
3
3
  */
4
4
  /// <reference lib="es2015.symbol" />
5
5
  var SymbolPolyfill = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol' ?
@@ -3800,10 +3800,16 @@ function convertQueuingStrategyInit(init, context) {
3800
3800
  var byteLengthSizeFunction = function (chunk) {
3801
3801
  return chunk.byteLength;
3802
3802
  };
3803
- Object.defineProperty(byteLengthSizeFunction, 'name', {
3804
- value: 'size',
3805
- configurable: true
3806
- });
3803
+ try {
3804
+ Object.defineProperty(byteLengthSizeFunction, 'name', {
3805
+ value: 'size',
3806
+ configurable: true
3807
+ });
3808
+ }
3809
+ catch (_a) {
3810
+ // This property is non-configurable in older browsers, so ignore if this throws.
3811
+ // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/name#browser_compatibility
3812
+ }
3807
3813
  /**
3808
3814
  * A queuing strategy that counts the number of bytes in each chunk.
3809
3815
  *
@@ -3871,10 +3877,16 @@ function IsByteLengthQueuingStrategy(x) {
3871
3877
  var countSizeFunction = function () {
3872
3878
  return 1;
3873
3879
  };
3874
- Object.defineProperty(countSizeFunction, 'name', {
3875
- value: 'size',
3876
- configurable: true
3877
- });
3880
+ try {
3881
+ Object.defineProperty(countSizeFunction, 'name', {
3882
+ value: 'size',
3883
+ configurable: true
3884
+ });
3885
+ }
3886
+ catch (_a) {
3887
+ // This property is non-configurable in older browsers, so ignore if this throws.
3888
+ // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/name#browser_compatibility
3889
+ }
3878
3890
  /**
3879
3891
  * A queuing strategy that counts the number of chunks.
3880
3892
  *