From 4153a9bbce673c351193fcfbab13aa83c948d8b3 Mon Sep 17 00:00:00 2001 From: rjmacarthy Date: Wed, 10 Apr 2024 20:29:11 +0100 Subject: [PATCH] use boolean --- src/webview/providers.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/webview/providers.tsx b/src/webview/providers.tsx index 7c42da90..b0972c87 100644 --- a/src/webview/providers.tsx +++ b/src/webview/providers.tsx @@ -181,6 +181,8 @@ function ProviderForm({ onClose, provider }: ProviderFormProps) { onClose() } + const hasOllamaModels = !!models?.length + return ( <> @@ -268,7 +270,7 @@ function ProviderForm({ onClose, provider }: ProviderFormProps) { - {formState.provider === ApiProviders.Ollama && models?.length && ( + {formState.provider === ApiProviders.Ollama && hasOllamaModels && (