fix: handle nil cmds in tea.Sequentially (#214)

This commit is contained in:
Ajeet D'Souza
2022-02-02 07:22:49 +05:30
committed by GitHub
parent 77e63ac890
commit 7d18632ca5

View File

@@ -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
}