Skip to content

Commit

Permalink
bypass nestable keys
Browse files Browse the repository at this point in the history
  • Loading branch information
EasterTheBunny committed Jan 23, 2025
1 parent ea4e079 commit 670a4b3
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion pkg/codec/encodings/type_codec.go
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,12 @@ func getCodec(c map[string]TypeCodec, itemType string) (TypeCodec, error) {

ntcwt, ok := c[head]
if !ok {
return nil, fmt.Errorf("%w: cannot find type %s", types.ErrInvalidType, itemType)
if ntcwt, ok = c[itemType]; !ok {
return nil, fmt.Errorf("%w: cannot find type %s", types.ErrInvalidType, itemType)
}

// in this case, the codec is structured to not have nestable keys
return ntcwt, nil
}

if tail == "" {
Expand Down

0 comments on commit 670a4b3

Please sign in to comment.