From 7d18632ca500999e55b31e9920abd85ae97d1c39 Mon Sep 17 00:00:00 2001 From: Ajeet D'Souza <98ajeet@gmail.com> Date: Wed, 2 Feb 2022 07:22:49 +0530 Subject: [PATCH] fix: handle nil cmds in tea.Sequentially (#214) --- commands.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/commands.go b/commands.go index 5a4d3f0..8aeab21 100644 --- a/commands.go +++ b/commands.go @@ -68,6 +68,9 @@ func Tick(d time.Duration, fn func(time.Time) Msg) Cmd { func Sequentially(cmds ...Cmd) Cmd { return func() Msg { for _, cmd := range cmds { + if cmd == nil { + continue + } if msg := cmd(); msg != nil { return msg }