Skip to content

Commit 212fcc8

Browse files
committed
fix(ytypes): fix node cache condition for unmarshalGeneric
1 parent e3863e9 commit 212fcc8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

ytypes/node_cache.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,8 @@ func (c *NodeCache) set(path *gpb.Path, val interface{}, opts ...SetNodeOpt) (se
123123
}
124124

125125
// Set value in the config tree.
126-
if (*schema).Parent != nil && (*schema).Parent.IsContainer() {
126+
// Condition: the parent is a container or a list.
127+
if (*schema).Parent.IsContainer() || (*schema).Parent.IsList() {
127128
var encoding Encoding
128129
var options []UnmarshalOpt
129130
if hasSetNodePreferShadowPath(opts) {

0 commit comments

Comments
 (0)