Merge pull request #206 from benjamn/getAttribute-instead-of-getAttributeNode

Use getAttribute instead of getAttributeNode in ReactID.rawGetID
This commit is contained in:
Ben Newman
2013-07-17 18:24:27 -07:00
+1 -7
View File
@@ -57,13 +57,7 @@ function getID(node) {
}
function internalGetID(node) {
if (node && node.getAttributeNode) {
var attributeNode = node.getAttributeNode(ATTR_NAME);
if (attributeNode) {
return attributeNode.value || '';
}
}
return '';
return node && node.getAttribute && node.getAttribute(ATTR_NAME) || '';
}
/**