In both cases the node or edge is in the graph - we get the ID by iterating over the node and edge lists. It seems the error (if we believe it is an error) is that the node (or edge) does not have an object label. I'd be OK with failing silently in that case because it implies that there are no attributes to be read. If _.has blows up on null or undefined then a better error message is warranted, or just fail silently. Whatever we do should be consistent for all non-object cases, though.
In both cases the node or edge is in the graph - we get the ID by iterating over the node and edge lists. It seems the error (if we believe it is an error) is that the node (or edge) does not have an object label. I'd be OK with failing silently in that case because it implies that there are no attributes to be read. If
_.has
blows up on null or undefined then a better error message is warranted, or just fail silently. Whatever we do should be consistent for all non-object cases, though.Also, a test case would be great for this patch.