From 6cccb5da31e3dcb168b4d8fc838ccf8aabd3a033 Mon Sep 17 00:00:00 2001 From: Anil Sahoo Date: Mon, 7 Oct 2024 11:41:27 +0530 Subject: [PATCH] Fixed an issue where Dashboard tab showing 'Something went wrong'. #7955 --- web/pgadmin/dashboard/static/js/Dashboard.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/pgadmin/dashboard/static/js/Dashboard.jsx b/web/pgadmin/dashboard/static/js/Dashboard.jsx index 46a6c78f4..29e929b48 100644 --- a/web/pgadmin/dashboard/static/js/Dashboard.jsx +++ b/web/pgadmin/dashboard/static/js/Dashboard.jsx @@ -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]);