Skip to content

Commit

Permalink
Merge pull request #3 from FlamesX-128/develop
Browse files Browse the repository at this point in the history
out of index fixed when the novel only has one episode.
  • Loading branch information
FlamesX-128 authored Nov 13, 2022
2 parents 32dc16a + 124b562 commit 62414dc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions controllers/interfaces/ask/novel.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ func NovelToSelect(options []string) (string, error) {
func EpisodeToSelect(size int) (string, error) {
switch size {
case 0:
return "1", errors.New("no episodes found")
return "0", errors.New("no episodes found")
case 1:
return "2", nil
return "1", nil
}

message := fmt.Sprintf("which episode do you want to select? (1-%d)", size)
Expand Down

0 comments on commit 62414dc

Please sign in to comment.