From e79db4a3b69332c91877e1d38f944d157036c55e Mon Sep 17 00:00:00 2001 From: Ernesto Cianciotta Date: Fri, 15 Nov 2024 17:52:19 +0100 Subject: [PATCH] fix: in react segment added check for the react package presence --- src/segments/react.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/segments/react.go b/src/segments/react.go index 19f6ca0456dd..d47acc9ccc86 100644 --- a/src/segments/react.go +++ b/src/segments/react.go @@ -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() }