Skip to content

Commit dffa15f

Browse files
committed
return empty ArbitraryString if the given item does not exist
1 parent 7451b4f commit dffa15f

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

cmd/export.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,11 @@ var exportCmd = &cobra.Command{
5757

5858
funcMap := template.FuncMap{
5959
"ArbitraryString": func(i int) string {
60-
return arbitraryString[i]
60+
if len(arbitraryString) >= i+1 {
61+
return arbitraryString[i]
62+
}
63+
64+
return ""
6165
},
6266
"ExportDate": func() string {
6367
return exportDate

0 commit comments

Comments
 (0)