From 60563af5745bf7617115693cddc549401cf80ab4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lincoln=20J=C3=BAnior?= <99145408+lincolnjpg@users.noreply.github.com> Date: Fri, 21 Oct 2022 01:49:12 -0300 Subject: [PATCH] fix(cli): prevents next step until an available commit type is selected --- cmd/tui.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cmd/tui.go b/cmd/tui.go index 4f9cdba..de51ab4 100644 --- a/cmd/tui.go +++ b/cmd/tui.go @@ -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)