mirror of
https://github.com/charmbracelet/glow
synced 2024-11-10 06:04:18 +00:00
Fix case where stashDocument could erroneously return a command in a command
This commit is contained in:
parent
f2c3ef12ea
commit
025dcee3da
1 changed files with 4 additions and 6 deletions
10
ui/ui.go
10
ui/ui.go
|
@ -647,13 +647,11 @@ func saveDocumentNote(cc *charm.Client, id int, note string) tea.Cmd {
|
|||
func stashDocument(cc *charm.Client, md markdown) tea.Cmd {
|
||||
return func() tea.Msg {
|
||||
if cc == nil {
|
||||
return func() tea.Msg {
|
||||
err := errors.New("can't stash; no charm client")
|
||||
if debug {
|
||||
log.Println("error stashing document:", err)
|
||||
}
|
||||
return stashFailMsg{err, md}
|
||||
err := errors.New("can't stash; no charm client")
|
||||
if debug {
|
||||
log.Println("error stashing document:", err)
|
||||
}
|
||||
return stashFailMsg{err, md}
|
||||
}
|
||||
|
||||
// Is the document missing a body? If so, it likely means it needs to
|
||||
|
|
Loading…
Reference in a new issue