mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
Merge pull request #206 from benjamn/getAttribute-instead-of-getAttributeNode
Use getAttribute instead of getAttributeNode in ReactID.rawGetID
This commit is contained in:
+1
-7
@@ -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) || '';
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user