diff --git a/src/sql/workbench/contrib/notebook/browser/notebookExplorer/notebookSearch.ts b/src/sql/workbench/contrib/notebook/browser/notebookExplorer/notebookSearch.ts index 1e871a7863..ba9884548e 100644 --- a/src/sql/workbench/contrib/notebook/browser/notebookExplorer/notebookSearch.ts +++ b/src/sql/workbench/contrib/notebook/browser/notebookExplorer/notebookSearch.ts @@ -259,7 +259,7 @@ export class NotebookSearchView extends SearchView { const onComplete = async (completed?: ISearchComplete) => { let end = new Date().getTime(); this._telemetryService.createActionEvent(TelemetryKeys.TelemetryView.Notebook, TelemetryKeys.TelemetryAction.SearchCompleted) - .withAdditionalProperties({ resultsReturned: completed.results.length }) + .withAdditionalProperties({ resultsReturned: completed?.results.length }) .withAdditionalMeasurements({ timeTakenMs: end - start }) .send();