Skip to content

Commit

Permalink
fix for #92
Browse files Browse the repository at this point in the history
  • Loading branch information
Yaffle committed Aug 14, 2017
1 parent f789ee7 commit b9eb9e9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/eventsource.js
Expand Up @@ -164,7 +164,7 @@
xhr.responseType = "text";
if ("setRequestHeader" in xhr) {
for (var name in headers) {
if (Object.prototype.hasOwnProperty.call(name, headers)) {
if (Object.prototype.hasOwnProperty.call(headers, name)) {
xhr.setRequestHeader(name, headers[name]);
}
}
Expand Down
2 changes: 1 addition & 1 deletion tests/eventsource.js
Expand Up @@ -164,7 +164,7 @@
xhr.responseType = "text";
if ("setRequestHeader" in xhr) {
for (var name in headers) {
if (Object.prototype.hasOwnProperty.call(name, headers)) {
if (Object.prototype.hasOwnProperty.call(headers, name)) {
xhr.setRequestHeader(name, headers[name]);
}
}
Expand Down

0 comments on commit b9eb9e9

Please sign in to comment.