From c2a4bb1f6626fd6313bc8a8a08086bae4ad61fc5 Mon Sep 17 00:00:00 2001 From: Joy A Date: Wed, 30 Oct 2024 10:43:36 +0530 Subject: [PATCH] #1540 | Nil check for CustomDashboard activeDashboardUUID --- .../src/views/customDashboard/CustomDashboardView.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/openchs-android/src/views/customDashboard/CustomDashboardView.js b/packages/openchs-android/src/views/customDashboard/CustomDashboardView.js index 63c533a3c..a92ffc31c 100644 --- a/packages/openchs-android/src/views/customDashboard/CustomDashboardView.js +++ b/packages/openchs-android/src/views/customDashboard/CustomDashboardView.js @@ -332,7 +332,7 @@ class CustomDashboardView extends AbstractComponent { let filterConfigs, asOnDateFilterUUID, asOnDateFilter, asOnDateFilterValue, filters, dashboard; const hasDashboards = this.state.dashboards.length !== 0; - if (hasDashboards) { + if (hasDashboards && !_.isNil(this.state.activeDashboardUUID)) { dashboard = this.state.dashboards.find((x) => x.uuid === this.state.activeDashboardUUID); filters = dashboardFilterService.getFilters(dashboard.uuid); filterConfigs = dashboardFilterService.getFilterConfigsForDashboard(dashboard.uuid);