Skip to content

Commit

Permalink
Fix panic that could happen when deleting stuff really fast
Browse files Browse the repository at this point in the history
  • Loading branch information
meowgorithm committed Dec 24, 2020
1 parent 03d9316 commit 426f478
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion ui/stash.go
Expand Up @@ -759,7 +759,12 @@ func (m *stashModel) handleDocumentBrowsing(msg tea.Msg) tea.Cmd {
break
}

t := m.selectedMarkdown().markdownType
md := m.selectedMarkdown()
if md == nil {
break
}

t := md.markdownType
if t == StashedDoc || t == ConvertedDoc {
m.selectionState = selectionPromptingDelete
}
Expand Down

0 comments on commit 426f478

Please sign in to comment.