Skip to content

Commit

Permalink
fix: handle nil cmds in tea.Sequentially (#214)
Browse files Browse the repository at this point in the history
  • Loading branch information
ajeetdsouza committed Feb 2, 2022
1 parent 77e63ac commit 7d18632
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions commands.go
Expand Up @@ -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
}
Expand Down

0 comments on commit 7d18632

Please sign in to comment.