Skip to content

Commit

Permalink
Fix request headers iteration in util.ajax (katspaugh#1329)
Browse files Browse the repository at this point in the history
  • Loading branch information
janhartmann authored and thijstriemstra committed Feb 20, 2018
1 parent 18490cb commit f750c6f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/util/ajax.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ export default function ajax(options) {
if (options.xhr) {
if (options.xhr.requestHeaders) {
// add custom request headers
for (let header in options.xhr.requestHeaders) {
options.xhr.requestHeaders.forEach(header => {
xhr.setRequestHeader(header.key, header.value);
}
});
}
if (options.xhr.withCredentials) {
// use credentials
Expand Down

0 comments on commit f750c6f

Please sign in to comment.