Skip to content

Commit

Permalink
fix(ytypes): fix node cache condition for unmarshalGeneric
Browse files Browse the repository at this point in the history
  • Loading branch information
jayzhudev committed May 9, 2023
1 parent e3863e9 commit 66130ff
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ytypes/node_cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,8 @@ func (c *NodeCache) set(path *gpb.Path, val interface{}, opts ...SetNodeOpt) (se
}

// Set value in the config tree.
if (*schema).Parent != nil && (*schema).Parent.IsContainer() {
// Condition: not a node or the parent is a container.
if val.(*gpb.TypedValue).GetJsonIetfVal() == nil || ((*schema).Parent != nil && (*schema).Parent.IsContainer()) {
var encoding Encoding
var options []UnmarshalOpt
if hasSetNodePreferShadowPath(opts) {
Expand Down

0 comments on commit 66130ff

Please sign in to comment.