Skip to content

Commit

Permalink
fix: check for nil selected install in header vanilla message
Browse files Browse the repository at this point in the history
  • Loading branch information
mircearoata committed Mar 21, 2023
1 parent 0f73516 commit ba33ff4
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions tea/components/header.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,14 @@ func (h headerComponent) View() string {
out += "\n"

out += h.labelStyle.Render("Vanilla: ")
if h.root.GetCurrentInstallation().Vanilla {
out += "On"
if h.root.GetCurrentInstallation() != nil {
if h.root.GetCurrentInstallation().Vanilla {
out += "On"
} else {
out += "Off"
}
} else {
out += "Off"
out += "N/A"
}

return lipgloss.NewStyle().Margin(1, 0).Render(out)
Expand Down

0 comments on commit ba33ff4

Please sign in to comment.