Fix getting node by field name or ID.
@@ -564,7 +564,10 @@ recur:
// If the field refers to a hidden node, return its first visible
// child.
else {
- return ts_node_child(child, 0);
+ TSNode result = ts_node_child(child, 0);
+ if (result.id) return result;
+ field_map++;
+ if (field_map == field_map_end) return ts_node__null();
}
}
}
