fix: TypeError: Cannot read properties of undefined (reading 'authType') (#3914)

This commit is contained in:
Gaurav 2025-07-11 14:08:49 -07:00 committed by GitHub
parent a071f604e3
commit 764809753a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 13 additions and 13 deletions

View file

@ -226,7 +226,7 @@ export const useGeminiStream = (
new UserPromptEvent(
trimmedQuery.length,
prompt_id,
config.getContentGeneratorConfig().authType!,
config.getContentGeneratorConfig()?.authType,
trimmedQuery,
),
);
@ -408,7 +408,7 @@ export const useGeminiStream = (
type: MessageType.ERROR,
text: parseAndFormatApiError(
eventValue.error,
config.getContentGeneratorConfig().authType,
config.getContentGeneratorConfig()?.authType,
undefined,
config.getModel(),
DEFAULT_GEMINI_FLASH_MODEL,
@ -588,7 +588,7 @@ export const useGeminiStream = (
type: MessageType.ERROR,
text: parseAndFormatApiError(
getErrorMessage(error) || 'Unknown error',
config.getContentGeneratorConfig().authType,
config.getContentGeneratorConfig()?.authType,
undefined,
config.getModel(),
DEFAULT_GEMINI_FLASH_MODEL,