Commit 2a917955 authored by echicken's avatar echicken
Browse files

Ditch the 'self' stuff and give forEach a thisArg instead.

parent 95f4ca46
......@@ -46,11 +46,10 @@ HTTPRequest.prototype.AddDefaultHeaders=function(){
HTTPRequest.prototype.AddExtraHeaders = function () {
if (typeof this.extra_headers !== 'object') return;
var self = this;
Object.keys(this.extra_headers).forEach(
function (e) {
self.request_headers.push(e + ': ' + self.extra_headers[e]);
}
this.request_headers.push(e + ': ' + this.extra_headers[e]);
}, this
);
};
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment