forked from Mirrors/bubbletea
fix: handle nil cmds in tea.Sequentially (#214)
This commit is contained in:
parent
77e63ac890
commit
7d18632ca5
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue