Skip to content

Commit

Permalink
fix(pro): only set default option in pro cli prompt when default temp…
Browse files Browse the repository at this point in the history
…late is set
  • Loading branch information
pascalbreuninger committed Jan 30, 2025
1 parent 6093dd2 commit d6b5b2a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pkg/platform/form/form.go
Original file line number Diff line number Diff line change
Expand Up @@ -323,8 +323,10 @@ func getTemplateOptions(ctx context.Context, client client.Client, project *mana
}
opts = append(opts, opt)
}
// make sure the default template is the first
opts = slices.Insert(opts, 0, defaultOpt)
if defaultOpt.Key != "" {
// make sure the default template is the first
opts = slices.Insert(opts, 0, defaultOpt)
}

return opts
}
Expand Down

0 comments on commit d6b5b2a

Please sign in to comment.