Skip to content

Commit

Permalink
feat: remove hard-error when slice matcher reaches non-string/bytes node
Browse files Browse the repository at this point in the history
  • Loading branch information
rvagg committed Jul 7, 2023
1 parent 32273f9 commit 211944d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion traversal/selector/matcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ func (s Slice) Slice(n datamodel.Node) (datamodel.Node, error) {

return basicnode.NewBytes(bytes[from:to]), nil
default:
return nil, fmt.Errorf("selector slice rejected on %s: subset match must be over string or bytes", n.Kind())
return nil, nil
}
}

Expand Down

0 comments on commit 211944d

Please sign in to comment.