fix(list): check items slice len

Signed-off-by: Christian Stewart <christian@paral.in>
This commit is contained in:
Christian Stewart 2022-01-03 13:26:19 -08:00 committed by Christian Rocha
parent b35f96cd2d
commit eef9098f37

View File

@ -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)