From 141aa8582abb96f671badbb100bbd6dab3f85a7c Mon Sep 17 00:00:00 2001 From: Megan Rogge Date: Thu, 10 Jul 2025 16:03:07 -0400 Subject: [PATCH] check if thisArgs are defined (#255214) --- src/vs/workbench/api/common/extHost.api.impl.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/vs/workbench/api/common/extHost.api.impl.ts b/src/vs/workbench/api/common/extHost.api.impl.ts index 87fc94481a3..0f44ca6f3c1 100644 --- a/src/vs/workbench/api/common/extHost.api.impl.ts +++ b/src/vs/workbench/api/common/extHost.api.impl.ts @@ -1359,7 +1359,9 @@ export function createApiFactoryAndRegisterActors(accessor: ServicesAccessor): I }, onDidStartTask: (listeners, thisArgs?, disposables?) => { if (!isProposedApiEnabled(extension, 'taskExecutionTerminal')) { - thisArgs.terminal = undefined; + if (thisArgs) { + thisArgs.terminal = undefined; + } } return _asExtensionEvent(extHostTask.onDidStartTask)(listeners, thisArgs, disposables); },