This commit is contained in:
jregan
2020-08-07 15:57:00 -07:00
parent fb216d8af8
commit c94f164e66
2 changed files with 5 additions and 11 deletions

View File

@@ -45,10 +45,7 @@ func IsEmpty(node *RNode) bool {
// IsEmptyMap returns true if the RNode is an empty node or an empty map
func IsEmptyMap(node *RNode) bool {
if IsEmpty(node) {
return true
}
return IsYNodeEmptyMap(node.YNode())
return IsEmpty(node) || IsYNodeEmptyMap(node.YNode())
}
// IsNil return true if the node is nil, or its underlying YNode is nil.