Skip to content

Commit

Permalink
front: always add headers to options to avoid null reference
Browse files Browse the repository at this point in the history
  • Loading branch information
AleksTeresh committed Mar 20, 2024
1 parent c1e03c2 commit bf9a559
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion frontend/src/util/apiConnection.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const devDefaultOptions = {

const getRequestOptions = () => {
const mockUserShibId = localStorage.getItem(MOCK_USER)
const options = isDevEnv ? devDefaultOptions : {}
const options = isDevEnv ? devDefaultOptions : { headers: {} }
return mockUserShibId
? { ...options, headers: { ...options.headers, 'x-mock-user-id': mockUserShibId } }
: options
Expand Down

0 comments on commit bf9a559

Please sign in to comment.