Skip to content

Commit

Permalink
fix: skip bubbletea view if no file included
Browse files Browse the repository at this point in the history
  • Loading branch information
samsullivan committed Jan 18, 2024
1 parent 6c85521 commit 0f12995
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions model/view.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@ var (
)

func (m model) View() string {
if m.file == nil {
// FatalError will be returned by parseFile() command triggered by Init().
return ""
}

if !m.viewportReady || m.data == nil {
return m.footerView()
}
Expand Down

0 comments on commit 0f12995

Please sign in to comment.