Skip to content

Commit

Permalink
fix(list): check items slice len
Browse files Browse the repository at this point in the history
Signed-off-by: Christian Stewart <christian@paral.in>
  • Loading branch information
paralin authored and meowgorithm committed Jan 11, 2022
1 parent b35f96c commit eef9098
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion list/list.go
Expand Up @@ -611,7 +611,7 @@ func (m *Model) updateKeybindings() {
m.KeyMap.CloseFullHelp.SetEnabled(false)

default:
hasItems := m.items != nil
hasItems := len(m.items) != 0
m.KeyMap.CursorUp.SetEnabled(hasItems)
m.KeyMap.CursorDown.SetEnabled(hasItems)

Expand Down

0 comments on commit eef9098

Please sign in to comment.