Skip to content

Commit

Permalink
Place a nil guard within TermFacets' Terms() API (#1654)
Browse files Browse the repository at this point in the history
For #1653
  • Loading branch information
abhinavdangeti authored Feb 24, 2022
1 parent 28b8a27 commit 12d7c16
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions search/facets_builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,9 @@ type TermFacets struct {
}

func (tf *TermFacets) Terms() []*TermFacet {
if tf == nil {
return []*TermFacet{}
}
return tf.termFacets
}

Expand Down

0 comments on commit 12d7c16

Please sign in to comment.