Only error if requesting a specific array index
This commit is contained in:
parent
84b9cdc93a
commit
edcd2d431c
1 changed files with 1 additions and 1 deletions
|
@ -1057,7 +1057,7 @@ func (d *Doc) walk(exec Iterator, prev []string, path ...string) error {
|
||||||
|
|
||||||
c, i, r := d.what(p, a, choose)
|
c, i, r := d.what(p, a, choose)
|
||||||
|
|
||||||
if len(c) == 0 {
|
if r == one && len(c) == 0 {
|
||||||
return fmt.Errorf("No item with index %s in array, using path %s", p, path)
|
return fmt.Errorf("No item with index %s in array, using path %s", p, path)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue