Fixed an issue where Dashboard tab showing 'Something went wrong'. #7955

pull/8011/head
Anil Sahoo 2024-10-07 11:41:27 +05:30 committed by GitHub
parent 6c3f0a4606
commit 6cccb5da31
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -935,7 +935,7 @@ function Dashboard({
const filteredDashData = useMemo(()=>{
if (mainTabVal == 1 && activeOnly && dashData.length > 0) {
// we want to show 'idle in transaction', 'active', 'active in transaction', and future non-blank, non-"idle" status values
return dashData[0]['activity'].filter((r)=>(r.state && r.state != '' && r.state != 'idle'));
return dashData[0]['activity']?.filter((r)=>(r.state && r.state != '' && r.state != 'idle'));
}
return dashData && dashData[0] && dashData[0]['activity'] || [];
}, [dashData, activeOnly, mainTabVal]);