Skip to content

Commit

Permalink
[8.16] [Search] Fix playground crash when adding connector (#198365) (#…
Browse files Browse the repository at this point in the history
…198399)

# Backport

This will backport the following commits from `main` to `8.16`:
- [[Search] Fix playground crash when adding connector
(#198365)](#198365)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Sander
Philipse","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-10-30T16:12:16Z","message":"[Search]
Fix playground crash when adding connector (#198365)\n\nFixes an issue
where Playground occasionally crashed because a connector\r\nmodel is
undefined.","sha":"ac3193582edba82a9791e483b143de33ed50f47b","branchLabelMapping":{"^v9.0.0$":"main","^v8.17.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","Team:Search","v8.16.0","backport:version","v8.17.0"],"title":"[Search]
Fix playground crash when adding
connector","number":198365,"url":"https://github.com/elastic/kibana/pull/198365","mergeCommit":{"message":"[Search]
Fix playground crash when adding connector (#198365)\n\nFixes an issue
where Playground occasionally crashed because a connector\r\nmodel is
undefined.","sha":"ac3193582edba82a9791e483b143de33ed50f47b"}},"sourceBranch":"main","suggestedTargetBranches":["8.16","8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/198365","number":198365,"mergeCommit":{"message":"[Search]
Fix playground crash when adding connector (#198365)\n\nFixes an issue
where Playground occasionally crashed because a connector\r\nmodel is
undefined.","sha":"ac3193582edba82a9791e483b143de33ed50f47b"}},{"branch":"8.16","label":"v8.16.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.x","label":"v8.17.0","branchLabelMappingKey":"^v8.17.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Sander Philipse <[email protected]>
  • Loading branch information
kibanamachine and sphilipse authored Oct 30, 2024
1 parent 8d35157 commit 8571809
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 8571809

Please sign in to comment.