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.
@@ -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
  const SymbolPolyfill = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol' ?
@@ -3707,10 +3707,16 @@ function convertQueuingStrategyInit(init, context) {
3707
3707
  const byteLengthSizeFunction = (chunk) => {
3708
3708
  return chunk.byteLength;
3709
3709
  };
3710
- Object.defineProperty(byteLengthSizeFunction, 'name', {
3711
- value: 'size',
3712
- configurable: true
3713
- });
3710
+ try {
3711
+ Object.defineProperty(byteLengthSizeFunction, 'name', {
3712
+ value: 'size',
3713
+ configurable: true
3714
+ });
3715
+ }
3716
+ catch (_a) {
3717
+ // This property is non-configurable in older browsers, so ignore if this throws.
3718
+ // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/name#browser_compatibility
3719
+ }
3714
3720
  /**
3715
3721
  * A queuing strategy that counts the number of bytes in each chunk.
3716
3722
  *
@@ -3769,10 +3775,16 @@ function IsByteLengthQueuingStrategy(x) {
3769
3775
  const countSizeFunction = () => {
3770
3776
  return 1;
3771
3777
  };
3772
- Object.defineProperty(countSizeFunction, 'name', {
3773
- value: 'size',
3774
- configurable: true
3775
- });
3778
+ try {
3779
+ Object.defineProperty(countSizeFunction, 'name', {
3780
+ value: 'size',
3781
+ configurable: true
3782
+ });
3783
+ }
3784
+ catch (_a) {
3785
+ // This property is non-configurable in older browsers, so ignore if this throws.
3786
+ // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/name#browser_compatibility
3787
+ }
3776
3788
  /**
3777
3789
  * A queuing strategy that counts the number of chunks.
3778
3790
  *