Skip to content

Commit

Permalink
Merge pull request #19 from lincolnjpg/fix/only-available-commit-types
Browse files Browse the repository at this point in the history
fix(cli): prevents next step until an available commit type is selected
  • Loading branch information
SKalt authored Oct 21, 2022
2 parents a6176fc + 60563af commit a4dc54a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions cmd/tui.go
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,12 @@ func (m model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
switch m.viewing {
default:
m = m.submit().advance()
case commitTypeIndex:
if m.currentComponent().Value() == "" {
return m, cmd
} else {
m = m.submit().advance()
}
case scopeIndex:
if m.currentComponent().Value() == "new scope" {
m.scopeInput, cmd = m.scopeInput.Update(msg)
Expand Down

0 comments on commit a4dc54a

Please sign in to comment.