Skip to content

Commit

Permalink
Fix changelogs crashing after removing 2fa option
Browse files Browse the repository at this point in the history
  • Loading branch information
alexstotsky committed Aug 15, 2023
1 parent 7de91f6 commit 416ae4f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/state/changeLogs/reducer.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import _get from 'lodash/get'
import authTypes from 'state/auth/constants'
import timeRangeTypes from 'state/timeRange/constants'
import { fetch, fetchFail } from 'state/reducers.helper'
import _isString from 'lodash/isString'

import types from './constants'

Expand Down Expand Up @@ -37,12 +38,16 @@ export function changeLogsReducer(state = initialState, action) {
userAgent,
} = entry

const preparedUserAgent = _isString(userAgent)
? userAgent
: userAgent?.raw

return {
ip,
log,
mtsCreate,
subUserId,
userAgent,
userAgent: preparedUserAgent,
}
})

Expand Down

0 comments on commit 416ae4f

Please sign in to comment.