Skip to content

Commit

Permalink
cuetil: Guard against empty values in AppendSplit
Browse files Browse the repository at this point in the history
  • Loading branch information
sam boyer committed May 15, 2023
1 parent 3146087 commit e1d0481
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions internal/cuetil/split.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ import (
//
// Most calls to this should pass nil for the third parameter.
func AppendSplit(v cue.Value, splitBy cue.Op, a []cue.Value) []cue.Value {
if !v.Exists() {
return nil
}
op, args := v.Expr()
// dedup elements.
k := 1
Expand Down

0 comments on commit e1d0481

Please sign in to comment.