Don't error out if we can't fetch reports
This commit is contained in:
parent
e4e8ed812b
commit
b1f41add0e
1 changed files with 1 additions and 1 deletions
|
@ -650,7 +650,7 @@ const getReports = ({ state, limit, page, pageSize, credentials }) => {
|
|||
url = url + (args ? '?' + args : '')
|
||||
return fetch(url, { headers: authHeaders(credentials) })
|
||||
.then((data) => data.json())
|
||||
.then((data) => data.reports.map(parseReport))
|
||||
.then((data) => data?.reports?.map(parseReport) ?? [])
|
||||
}
|
||||
|
||||
const updateReportStates = ({ credentials, reports }) => {
|
||||
|
|
Loading…
Reference in a new issue