@samitouri / QOS-React-2 / commits / add809be21
Fork 0

The library for web and native user interfaces.

Add comment explaining internalGetID

Ben Newman committed Jul 22, 2013 at 10:24 UTC add809be2151a828f6a02fff393ad43b01486b28
1 file changed +3
src/core/ReactID.js
+3
@@ -57,6 +57,9 @@ function getID(node) {
57 }
58
59 function internalGetID(node) {
60 + // If node is something like a window, document, or text node, none of
61 + // which support attributes or a .getAttribute method, gracefully return
62 + // the empty string, as if the attribute were missing.
63 return node && node.getAttribute && node.getAttribute(ATTR_NAME) || '';
64 }
65