From bbe87bfb81d1f2bca2658450547c1f43d2ca29bb Mon Sep 17 00:00:00 2001 From: rsteube Date: Fri, 9 Feb 2024 22:32:10 +0100 Subject: [PATCH] ActionValues: skip empty --- defaultActions.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/defaultActions.go b/defaultActions.go index 9b192860c..ace85cf31 100644 --- a/defaultActions.go +++ b/defaultActions.go @@ -149,7 +149,9 @@ func ActionValues(values ...string) Action { return ActionCallback(func(c Context) Action { vals := make([]common.RawValue, 0, len(values)) for _, val := range values { - vals = append(vals, common.RawValue{Value: val, Display: val}) + if val != "" { + vals = append(vals, common.RawValue{Value: val, Display: val}) + } } return Action{rawValues: vals} })