diff --git a/ui/app/common/displaycontrols/dashboard/directives/dashboard.js b/ui/app/common/displaycontrols/dashboard/directives/dashboard.js index b01cad48ab..c6fe455c43 100644 --- a/ui/app/common/displaycontrols/dashboard/directives/dashboard.js +++ b/ui/app/common/displaycontrols/dashboard/directives/dashboard.js @@ -17,7 +17,7 @@ angular.module('bahmni.common.displaycontrol.dashboard') }).find(function (section) { return section.type === Bahmni.Common.Constants.formsV2ReactDisplayControlType; }); - return section.dashboardConfig || null; + return (section && section.dashboardConfig !== undefined && section.dashboardConfig !== null) ? section.dashboardConfig : null; }; if ($scope.patient !== undefined) {