We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7f33252 commit 7acd789Copy full SHA for 7acd789
src/utils/apikey.ts
@@ -1,3 +1,3 @@
1
export function isValidAPIKey(apiKey: string | null) {
2
- return apiKey.startsWith("sk-") || apiKey.startsWith("sk-proj-");
+ return apiKey != null && (apiKey.startsWith("sk-") || apiKey.startsWith("sk-proj-"));
3
}
0 commit comments