Skip to content

Commit

Permalink
[Search] Fix playground crash when adding connector (#198365)
Browse files Browse the repository at this point in the history
Fixes an issue where Playground occasionally crashed because a connector
model is undefined.

(cherry picked from commit ac31935)
  • Loading branch information
sphilipse committed Oct 30, 2024
1 parent d92ea83 commit d3484f3
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,9 @@ export const SummarizationModel: React.FC<SummarizationModelProps> = ({

useEffect(() => {
usageTracker?.click(
`${AnalyticsEvents.modelSelected}_${selectedModel!.value || selectedModel!.connectorType}`
`${AnalyticsEvents.modelSelected}_${
selectedModel?.value || selectedModel?.connectorType || 'unknown'
}`
);
}, [usageTracker, selectedModel]);

Expand Down

0 comments on commit d3484f3

Please sign in to comment.