Skip to content

Commit

Permalink
Fix parseToStrings empty case (#2)
Browse files Browse the repository at this point in the history
Co-authored-by: Ramzi Talhouk <[email protected]>
  • Loading branch information
rtalhouk and Ramzi Talhouk authored Oct 25, 2023
1 parent e6ab606 commit 1c89068
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions field.go
Original file line number Diff line number Diff line change
Expand Up @@ -378,6 +378,10 @@ func (f *Field) parseString(value string) (any, error) {
}

func (f *Field) parseToStrings(value string) []string {
if value == "" {
return []string{}
}

list := strings.Split(value, ",")
values := make([]string, len(list))

Expand Down

0 comments on commit 1c89068

Please sign in to comment.