Skip to content

Commit

Permalink
fix: in react segment added check for the react package presence
Browse files Browse the repository at this point in the history
  • Loading branch information
ernstc authored and JanDeDobbeleer committed Nov 16, 2024
1 parent a4c76fc commit e79db4a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/segments/react.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ func (r *React) Enabled() bool {
}
r.versionURLTemplate = "https://github.com/facebook/react/releases/tag/v{{.Full}}"

if !r.hasNodePackage("react") {
return false
}

return r.language.Enabled()
}

Expand Down

0 comments on commit e79db4a

Please sign in to comment.