fix(font): ignore enter while downloading font list

This commit is contained in:
Jan De Dobbeleer 2023-04-04 07:06:46 +02:00 committed by Jan De Dobbeleer
parent 37c69e9534
commit 9f5ff92676

View file

@ -194,7 +194,7 @@ func (m *main) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
return m, tea.Quit
case "enter":
if len(m.font) != 0 {
if len(m.font) != 0 || m.list == nil || m.list.SelectedItem() == nil {
return m, nil
}
var font *Asset