Declare cookies variable

This actually declares the cookies array in the `onHeadersReceived` listener.

Fixes #26.
This commit is contained in:
David Tomaschik
2020-11-17 15:00:51 -08:00
committed by GitHub
parent 3e479c9b33
commit cfdf811f81
+1 -1
View File
@@ -443,7 +443,7 @@ chrome.webRequest.onHeadersReceived.addListener(function(details) {
}
// Rewrite Set-Cookie to expose it in fetch()
cookies = []
var cookies = []
details.responseHeaders.map(responseHeader => {
if(responseHeader.name.toLowerCase() === 'set-cookie') {
cookies.push(responseHeader.value);