Skip to content

Commit

Permalink
build 0.4.22
Browse files Browse the repository at this point in the history
  • Loading branch information
salvoravida committed Dec 17, 2018
1 parent 26d0d8f commit 053b060
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions lib/react-adal.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,12 +81,8 @@ function runWithAdal(authContext, app, doNotLogin) {
function adalFetch(authContext, resourceGuiId, fetch, url, options) {
return adalGetToken(authContext, resourceGuiId).then(function (token) {
var o = options || {};
if (!o.headers) o.headers = new Headers();
if (typeof o.append === 'function') {
o.headers.append('Authorization', 'Bearer ' + token);
} else {
o.headers.Authorization = 'Bearer ' + token;
}
if (!o.headers) o.headers = {};
o.headers.Authorization = 'Bearer ' + token;
return fetch(url, o);
});
}
Expand Down

0 comments on commit 053b060

Please sign in to comment.