From 4b9c43848e0cdb0f851bddc0378d103ecbeb28c0 Mon Sep 17 00:00:00 2001 From: Alex Ma Date: Fri, 7 Jan 2022 15:31:46 -0800 Subject: [PATCH] Added undefined check to profiler (#18025) --- src/sql/workbench/contrib/profiler/browser/profilerEditor.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sql/workbench/contrib/profiler/browser/profilerEditor.ts b/src/sql/workbench/contrib/profiler/browser/profilerEditor.ts index 712c14fa4a..0a3165bab7 100644 --- a/src/sql/workbench/contrib/profiler/browser/profilerEditor.ts +++ b/src/sql/workbench/contrib/profiler/browser/profilerEditor.ts @@ -464,7 +464,7 @@ export class ProfilerEditor extends EditorPane { let savedViewState = this._savedTableViewStates.get(input); this._profilerEditorContextKey.set(true); - if (input instanceof ProfilerInput && input.matches(this.input)) { + if (input instanceof ProfilerInput && this.input !== undefined && input.matches(this.input)) { if (savedViewState) { this._profilerTableEditor.restoreViewState(savedViewState); }