Skip to content

Commit

Permalink
Merge pull request #18 from oaStuff/dev
Browse files Browse the repository at this point in the history
prevented nil from a slice
  • Loading branch information
oaStuff authored Jan 13, 2018
2 parents 641e505 + ec5ad18 commit 24093f5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion utils/sliceList.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,9 @@ func (list *SliceList) Get(key interface{}) (interface{}, bool) {
func (list *SliceList) Values() []interface{} {
newElements := make([]interface{}, 0, list.size)
list.items.Range(func(key, value interface{}) bool {
newElements = append(newElements, value)
if value != nil {
newElements = append(newElements, value)
}
return true
})
return newElements
Expand Down

0 comments on commit 24093f5

Please sign in to comment.