diff --git a/ui/app/common/attributeTypes/directives/attributeTypes.js b/ui/app/common/attributeTypes/directives/attributeTypes.js index 3ab18d99c7..2d3807bbe0 100644 --- a/ui/app/common/attributeTypes/directives/attributeTypes.js +++ b/ui/app/common/attributeTypes/directives/attributeTypes.js @@ -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);