Skip to content

Commit

Permalink
Merge "[FAB-8954] Fix index out of range panic"
Browse files Browse the repository at this point in the history
  • Loading branch information
fqutishat authored and Gerrit Code Review committed Mar 19, 2018
2 parents df35f4f + 944cecc commit 406f79d
Showing 1 changed file with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -378,10 +378,14 @@ func (o *andOperation) and(grps []Group, index int) {
if index >= len(grps) {
var items []Item
for _, c := range o.stack.Groups() {
items = append(items, c.group.Items()[c.index])
groupItems := c.group.Items()
if c.index < len(groupItems) {
items = append(items, groupItems[c.index])
}
}
if len(items) > 0 {
o.result = append(o.result, NewGroup(items))
}
g := NewGroup(items)
o.result = append(o.result, g)
} else {
grp := grps[index]
items := grp.Items()
Expand Down

0 comments on commit 406f79d

Please sign in to comment.