Skip to content

Commit 39a1edb

Browse files
committed
Fix logic for activating apiKeyEnvVar
Signed-off-by: Geoff Wilson <[email protected]>
1 parent fa0504f commit 39a1edb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

webview-ui/src/components/settings/providers/Anthropic.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ export const Anthropic = ({ apiConfiguration, setApiConfigurationField }: Anthro
3131

3232
const env = (window as any).PROCESS_ENV || {}
3333
const apiKeyEnvVarExists = !!env["ANTHROPIC_API_KEY"]
34-
const [useApiKeyEnvVar, setUseApiKeyEnvVar] = useState(!!apiConfiguration?.anthropicApiKeyUseEnvVar)
34+
const [useApiKeyEnvVar, setUseApiKeyEnvVar] = useState(!!apiConfiguration?.anthropicApiKeyUseEnvVar && apiKeyEnvVarExists)
3535

3636
const handleUseApiKeyEnvVarChange = (checked: boolean) => {
3737
setUseApiKeyEnvVar(checked)

0 commit comments

Comments
 (0)