Skip to content

Commit

Permalink
Fixed the number of tries
Browse files Browse the repository at this point in the history
  • Loading branch information
Will Dixon committed Apr 29, 2016
1 parent cc3d305 commit 34bb1e5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion menu.go
Original file line number Diff line number Diff line change
Expand Up @@ -166,14 +166,14 @@ func (m *Menu) Run() error {
//step 2 ask question, get and validate response
opt, err := m.ask()
if err != nil {
m.tries = m.tries - 1
if !IsMenuErr(err) {
err = newMenuError(err, "", m.triesLeft())
}
if m.loopOnInvalid && m.tries > 0 {
if m.clear {
Clear()
}
m.tries = m.tries - 1
m.ui.Error(err.Error())
} else {
return err
Expand Down

0 comments on commit 34bb1e5

Please sign in to comment.