Skip to content

Commit 73f9551

Browse files
committed
close softwareloop#37 Handle NPE when a property node doesn't have child nodes
1 parent be0fba2 commit 73f9551

File tree

1 file changed

+6
-1
lines changed
  • src/main/amp/web/js/softwareloop/inboxes

1 file changed

+6
-1
lines changed

src/main/amp/web/js/softwareloop/inboxes/Item.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,12 @@ define([
8080
var valueNode = browser.getElementsByTagName(propertyString, "cmis", "value");
8181
var cmisAttributeValue = null;
8282
if (valueNode && valueNode.length > 0) {
83-
cmisAttributeValue = converter(valueNode[0].firstChild.nodeValue);
83+
try {
84+
var nodeValue = valueNode[0].firstChild.nodeValue;
85+
cmisAttributeValue = converter(nodeValue);
86+
} catch (e) {
87+
cmisAttributeValue = null;
88+
}
8489
}
8590
this.entryAttributes[cmisAttributeName] = cmisAttributeValue;
8691
}

0 commit comments

Comments
 (0)