Skip to content

Commit

Permalink
#1512 | Fix crash on enabling/disabling dashboard auto-refresh
Browse files Browse the repository at this point in the history
  • Loading branch information
1t5j0y committed Sep 23, 2024
1 parent 952a160 commit 97932a1
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import _ from 'lodash';
import CustomDashboardService, {CustomDashboardType} from "../../service/customDashboard/CustomDashboardService";
import CustomDashboardService from "../../service/customDashboard/CustomDashboardService";
import DashboardSectionCardMappingService from "../../service/customDashboard/DashboardSectionCardMappingService";
import EntityService from "../../service/EntityService";
import {ReportCard, NestedReportCardResult} from "openchs-models";
import {ReportCard} from "openchs-models";
import ReportCardService from "../../service/customDashboard/ReportCardService";
import General from "../../utility/General";
import DashboardFilterService from "../../service/reports/DashboardFilterService";
Expand Down Expand Up @@ -133,7 +133,7 @@ class CustomDashboardActions {

const newState = {...state};

if (newState.dashboards.length === 0) {
if (_.isNil(newState.dashboards) || newState.dashboards.length === 0) {
return newState;
}

Expand Down

0 comments on commit 97932a1

Please sign in to comment.