fix breaking change

This commit is contained in:
Daniel Smith 2019-07-19 15:25:56 -07:00
parent 3c332a9487
commit f55efb8dae

View File

@ -94,7 +94,7 @@ func NewPathElement(s string) (fieldpath.PathElement, error) {
})
}
return fieldpath.PathElement{
Key: fields,
Key: &value.Map{Items: fields},
}, nil
default:
// Ignore unknown key types
@ -107,9 +107,9 @@ func PathElementString(pe fieldpath.PathElement) (string, error) {
switch {
case pe.FieldName != nil:
return Field + Separator + *pe.FieldName, nil
case len(pe.Key) > 0:
case pe.Key != nil:
kv := map[string]json.RawMessage{}
for _, k := range pe.Key {
for _, k := range pe.Key.Items {
b, err := k.Value.ToJSON()
if err != nil {
return "", err