From b217449c8e1733f366b17e6a78ed261520bcd12d Mon Sep 17 00:00:00 2001 From: Alexander Jung Date: Fri, 20 Jan 2023 11:34:00 +0100 Subject: [PATCH] fix: Check msg cmd is not nil before invoking GitHub-Fixes: #639 Signed-off-by: Alexander Jung --- tea.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tea.go b/tea.go index 03734bc..27bc3e3 100644 --- a/tea.go +++ b/tea.go @@ -310,6 +310,10 @@ func (p *Program) eventLoop(model Model, cmds chan Cmd) (Model, error) { go func() { // Execute commands one at a time, in order. for _, cmd := range msg { + if cmd == nil { + continue + } + p.Send(cmd()) } }()