Skip to content

Commit

Permalink
Update getRequestHeaders to always return an object
Browse files Browse the repository at this point in the history
  • Loading branch information
SrAnthony authored and bell-steven committed Aug 11, 2021
1 parent 5edf24b commit 1d5515a
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions GooglePlacesAutocomplete.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,11 +124,7 @@ export const GooglePlacesAutocomplete = forwardRef((props, ref) => {
};

const getRequestHeaders = (requestUrl) => {
if (requestUrl) {
return requestUrl.headers;
} else {
return {};
}
return requestUrl?.headers || {};
};

const setRequestHeaders = (request, headers) => {
Expand Down

0 comments on commit 1d5515a

Please sign in to comment.