fix(network): be able to remove headers using request.continue (#4797)

I think this was a regression caused here https://github.com/GoogleChrome/puppeteer/pull/4265/files#diff-d2ac7cb061b0c51644d0a5d6140e3a32R446

Fix #4743
This commit is contained in:
Darío Kondratiuk
2019-08-05 19:26:17 -03:00
committed by Andrey Lushnikov
parent 4acce550c4
commit b9b6ca1825
3 changed files with 23 additions and 3 deletions

View File

@@ -723,8 +723,10 @@ class SecurityDetails {
*/
function headersArray(headers) {
const result = [];
for (const name in headers)
result.push({name, value: headers[name] + ''});
for (const name in headers) {
if (!Object.is(headers[name], undefined))
result.push({name, value: headers[name] + ''});
}
return result;
}