Skip to content

Commit

Permalink
Add a condition to handle location name (#655)
Browse files Browse the repository at this point in the history
  • Loading branch information
SooryaKumaranC-tw authored Aug 1, 2023
1 parent bcf6912 commit 585af0b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ui/app/common/attributeTypes/directives/attributeTypes.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ angular.module('bahmni.common.attributeTypes', []).directive('attributeTypes', [
var location = _.find(attribute.answers, function (answer) {
return answer.uuid === attributeValueLocation.uuid;
});
attributeValueLocation = {uuid: attributeValueLocation.uuid, value: location.name};
attributeValueLocation = {uuid: attributeValueLocation.uuid, value: location ? location.name : ''};
};
$scope.getTranslatedAttributeTypes = function (attribute) {
var translatedName = Bahmni.Common.Util.TranslationUtil.translateAttribute(attribute, Bahmni.Common.Constants.patientAttribute, $translate);
Expand Down

0 comments on commit 585af0b

Please sign in to comment.