follow-redirects 1.14.5 → 1.14.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.
Potentially problematic release.
This version of follow-redirects might be problematic. Click here for more details.
- package/index.js +3 -2
- package/package.json +1 -1
package/index.js
CHANGED
@@ -525,11 +525,12 @@ function removeMatchingHeaders(regex, headers) {
|
|
525
525
|
var lastValue;
|
526
526
|
for (var header in headers) {
|
527
527
|
if (regex.test(header)) {
|
528
|
-
lastValue = headers[header]
|
528
|
+
lastValue = headers[header];
|
529
529
|
delete headers[header];
|
530
530
|
}
|
531
531
|
}
|
532
|
-
return lastValue
|
532
|
+
return (lastValue === null || typeof lastValue === "undefined") ?
|
533
|
+
undefined : String(lastValue).trim();
|
533
534
|
}
|
534
535
|
|
535
536
|
function createErrorType(code, defaultMessage) {
|