From 8c515ca551f5c19c79f85872c5acad7c9bcc6052 Mon Sep 17 00:00:00 2001 From: Rahul Ramesh Date: Thu, 18 Jul 2024 09:12:40 +0530 Subject: [PATCH] [Rahul] | BAH-3334 | Fix. Incorrect Accessing Of FormV2React Config --- .github/workflows/build_publish.yml | 1 + ui/app/common/displaycontrols/dashboard/directives/dashboard.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build_publish.yml b/.github/workflows/build_publish.yml index 067186bc53..742dc891f7 100644 --- a/.github/workflows/build_publish.yml +++ b/.github/workflows/build_publish.yml @@ -4,6 +4,7 @@ on: branches: - master - 'release-*' + - 'fix-dashboard' tags: - '[0-9]+.[0-9]+.[0-9]+' workflow_run: diff --git a/ui/app/common/displaycontrols/dashboard/directives/dashboard.js b/ui/app/common/displaycontrols/dashboard/directives/dashboard.js index b01cad48ab..1ee4cddb5f 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) {