Skip to content

Commit

Permalink
Fixed an issue where Dashboard tab showing 'Something went wrong'. #7955
Browse files Browse the repository at this point in the history
  • Loading branch information
anilsahoo20 committed Oct 4, 2024
1 parent 6c3f0a4 commit 0d812bc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion web/pgadmin/dashboard/static/js/Dashboard.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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]);
Expand Down

0 comments on commit 0d812bc

Please sign in to comment.