From ad19c664fe6660469c989fbc5f303e21082197c5 Mon Sep 17 00:00:00 2001 From: Christian Rocha Date: Tue, 7 Sep 2021 15:29:13 -0400 Subject: [PATCH] Condense/scope init cmd --- tea.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tea.go b/tea.go index 9ca95bd..8f52f0b 100644 --- a/tea.go +++ b/tea.go @@ -340,8 +340,7 @@ func (p *Program) Start() error { // Initialize program model := p.initialModel - initCmd := model.Init() - if initCmd != nil { + if initCmd := model.Init(); initCmd != nil { go func() { cmds <- initCmd }()