@whatwg-node/node-fetch 0.0.6-alpha-20230207100807-5eb50c6 → 0.0.6
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/index.js +6 -5
- package/index.mjs +6 -5
- package/package.json +1 -1
package/index.js
CHANGED
@@ -729,11 +729,12 @@ class PonyfillHeaders {
|
|
729
729
|
});
|
730
730
|
}
|
731
731
|
else {
|
732
|
-
for (const
|
733
|
-
const
|
734
|
-
if (
|
735
|
-
const normalizedValue = Array.isArray(
|
736
|
-
|
732
|
+
for (const initKey in headersInit) {
|
733
|
+
const initValue = headersInit[initKey];
|
734
|
+
if (initValue != null) {
|
735
|
+
const normalizedValue = Array.isArray(initValue) ? initValue.join(', ') : initValue;
|
736
|
+
const normalizedKey = initKey.toLowerCase();
|
737
|
+
this.map.set(normalizedKey, normalizedValue);
|
737
738
|
}
|
738
739
|
}
|
739
740
|
}
|
package/index.mjs
CHANGED
@@ -723,11 +723,12 @@ class PonyfillHeaders {
|
|
723
723
|
});
|
724
724
|
}
|
725
725
|
else {
|
726
|
-
for (const
|
727
|
-
const
|
728
|
-
if (
|
729
|
-
const normalizedValue = Array.isArray(
|
730
|
-
|
726
|
+
for (const initKey in headersInit) {
|
727
|
+
const initValue = headersInit[initKey];
|
728
|
+
if (initValue != null) {
|
729
|
+
const normalizedValue = Array.isArray(initValue) ? initValue.join(', ') : initValue;
|
730
|
+
const normalizedKey = initKey.toLowerCase();
|
731
|
+
this.map.set(normalizedKey, normalizedValue);
|
731
732
|
}
|
732
733
|
}
|
733
734
|
}
|