From 3aa98924617e6d67af5f99d08c567ea09ba5005e Mon Sep 17 00:00:00 2001 From: Logan Ramos Date: Fri, 18 Mar 2022 09:52:41 -0400 Subject: [PATCH] Fix casting --- src/vs/workbench/api/common/extHostDebugService.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/vs/workbench/api/common/extHostDebugService.ts b/src/vs/workbench/api/common/extHostDebugService.ts index 5b1522018cd..4cf2c2caa04 100644 --- a/src/vs/workbench/api/common/extHostDebugService.ts +++ b/src/vs/workbench/api/common/extHostDebugService.ts @@ -11,7 +11,7 @@ import { MainContext, MainThreadDebugServiceShape, ExtHostDebugServiceShape, DebugSessionUUID, IBreakpointsDeltaDto, ISourceMultiBreakpointDto, IFunctionBreakpointDto, IDebugSessionDto } from 'vs/workbench/api/common/extHost.protocol'; -import { Disposable, Position, Location, SourceBreakpoint, FunctionBreakpoint, DebugAdapterServer, DebugAdapterExecutable, DataBreakpoint, DebugConsoleMode, DebugAdapterInlineImplementation, DebugAdapterNamedPipeServer, TextDiffTabInput, NotebookEditorDiffTabInput, TextTabInput } from 'vs/workbench/api/common/extHostTypes'; +import { Disposable, Position, Location, SourceBreakpoint, FunctionBreakpoint, DebugAdapterServer, DebugAdapterExecutable, DataBreakpoint, DebugConsoleMode, DebugAdapterInlineImplementation, DebugAdapterNamedPipeServer, TextDiffTabInput, NotebookEditorDiffTabInput, TextTabInput, NotebookEditorTabInput, CustomEditorTabInput } from 'vs/workbench/api/common/extHostTypes'; import { AbstractDebugAdapter } from 'vs/workbench/contrib/debug/common/abstractDebugAdapter'; import { IExtHostWorkspace } from 'vs/workbench/api/common/extHostWorkspace'; import { IExtHostExtensionService } from 'vs/workbench/api/common/extHostExtensionService'; @@ -958,8 +958,8 @@ export class ExtHostVariableResolverService extends AbstractVariableResolverServ // Resolve a resource from the tab if (activeTab?.input instanceof TextDiffTabInput || activeTab?.input instanceof NotebookEditorDiffTabInput) { return activeTab?.input.modified; - } else { - return (activeTab?.input as TextTabInput | undefined)?.uri; + } else if (activeTab?.input instanceof TextTabInput || activeTab?.input instanceof NotebookEditorTabInput || activeTab?.input instanceof CustomEditorTabInput) { + return activeTab.input.uri; } } }