Skip to content

Commit

Permalink
Update RESTController.js
Browse files Browse the repository at this point in the history
Co-authored-by: Diamond Lewis <[email protected]>
Signed-off-by: Manuel <[email protected]>
  • Loading branch information
mtrezza and dplewis authored Apr 15, 2024
1 parent 4e01e58 commit 535e2f7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/RESTController.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ const RESTController = {
response = JSON.parse(xhr.responseText);
const availableHeaders = typeof xhr.getAllResponseHeaders === 'function' ? xhr.getAllResponseHeaders() : "";
headers = {};
if (typeof xhr.getResponseHeader === 'function' && availableHeaders && availableHeaders.indexOf('access-control-expose-headers') >= 0) {
if (typeof xhr.getResponseHeader === 'function' && availableHeaders?.indexOf('access-control-expose-headers') >= 0) {
const responseHeaders = xhr.getResponseHeader('access-control-expose-headers').split(', ');
responseHeaders.forEach(header => {
if (availableHeaders.indexOf(header.toLowerCase()) >= 0) {
Expand Down

0 comments on commit 535e2f7

Please sign in to comment.