Merge pull request #121 from hashicorp/filter-skip-nil-item
Skip nil items during filtering
This commit is contained in:
commit
9edfb078e1
@ -56,7 +56,7 @@ func (o *ObjectList) Filter(keys ...string) *ObjectList {
|
||||
var result ObjectList
|
||||
for _, item := range o.Items {
|
||||
// If there aren't enough keys, then ignore this
|
||||
if len(item.Keys) < len(keys) {
|
||||
if item == nil || len(item.Keys) < len(keys) {
|
||||
continue
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user