diff --git a/plasmid/source/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/util/PrintUtil.js b/plasmid/source/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/util/PrintUtil.js index 85c7903731c909f894d96690feeca707442449cd..350bdf7e0dd880a55e4724848eafd2f0cb9c6183 100644 --- a/plasmid/source/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/util/PrintUtil.js +++ b/plasmid/source/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/util/PrintUtil.js @@ -96,12 +96,14 @@ var PrintUtil = new function() { propertyContent = FormUtil.getVocabularyLabelForTermCode(propertyType, entity.properties[propertyCode]); } else if(propertyType.dataType === "MATERIAL") { var materialValue = entity.properties[propertyCode]; - var materialType = this._getMaterialTypeFromPropertyValue(materialValue); - if(materialType === "GENE" && entity.cachedMaterials) { //Specially supported materials from openBIS - var gene = this._getMaterialFromCode(entity.cachedMaterials, this._getMaterialCodeFromPropertyValue(materialValue)); - propertyContent = $("<span>").append(gene.properties["GENE_SYMBOLS"]); - } else { - propertyContent = $("<span>").append(materialValue); + if(materialValue) { + var materialType = this._getMaterialTypeFromPropertyValue(materialValue); + if(materialType === "GENE" && entity.cachedMaterials) { //Specially supported materials from openBIS + var gene = this._getMaterialFromCode(entity.cachedMaterials, this._getMaterialCodeFromPropertyValue(materialValue)); + propertyContent = $("<span>").append(gene.properties["GENE_SYMBOLS"]); + } else { + propertyContent = $("<span>").append(materialValue); + } } } else { propertyContent = entity.properties[propertyCode];