From 053b0602083f4f639319341681a88ae69fd573d5 Mon Sep 17 00:00:00 2001 From: salvoravida Date: Mon, 17 Dec 2018 11:00:45 +0100 Subject: [PATCH] build 0.4.22 --- lib/react-adal.js | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/lib/react-adal.js b/lib/react-adal.js index 68187a1..60fca94 100644 --- a/lib/react-adal.js +++ b/lib/react-adal.js @@ -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); }); }