Skip to content

Commit

Permalink
Fix empty agent name.
Browse files Browse the repository at this point in the history
  • Loading branch information
q-uint committed Feb 9, 2025
1 parent cd41382 commit 19b99da
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gen/generator.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ func NewGenerator(agentName, canisterName, packageName string, rawDID []rune) (*
if err != nil {
return nil, err
}
if rs := []rune(agentName); unicode.IsLower(rs[0]) {
if rs := []rune(agentName); len(rs) != 0 && unicode.IsLower(rs[0]) {
agentName = strings.ToUpper(agentName[:1]) + agentName[1:]
}
return &Generator{
Expand Down

0 comments on commit 19b99da

Please sign in to comment.