Skip to content

Commit

Permalink
use boolean
Browse files Browse the repository at this point in the history
  • Loading branch information
rjmacarthy committed Apr 10, 2024
1 parent daa2697 commit 4153a9b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/webview/providers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,8 @@ function ProviderForm({ onClose, provider }: ProviderFormProps) {
onClose()
}

const hasOllamaModels = !!models?.length

return (
<>
<VSCodeDivider />
Expand Down Expand Up @@ -268,7 +270,7 @@ function ProviderForm({ onClose, provider }: ProviderFormProps) {
</VSCodeDropdown>
</div>

{formState.provider === ApiProviders.Ollama && models?.length && (
{formState.provider === ApiProviders.Ollama && hasOllamaModels && (
<ModelSelect
models={models}
model={formState.modelName}
Expand Down

0 comments on commit 4153a9b

Please sign in to comment.