Skip to content

Commit

Permalink
fix(filter): guard against type being nil (#46)
Browse files Browse the repository at this point in the history
  • Loading branch information
ekristen authored Mar 28, 2024
1 parent 804aa1b commit 9c84ff2
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pkg/filter/filter.go
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,11 @@ func (f *Filter) UnmarshalYAML(unmarshal func(interface{}) error) error {
return err
}

f.Type = Type(m["type"].(string))
if m["type"] == nil {
f.Type = Exact
} else {
f.Type = Type(m["type"].(string))
}

if m["value"] == nil {
f.Value = ""
Expand Down

0 comments on commit 9c84ff2

Please sign in to comment.