check if thisArgs are defined (#255214)

This commit is contained in:
Megan Rogge 2025-07-10 16:03:07 -04:00 committed by GitHub
parent 762754e6b8
commit 141aa8582a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 1 deletions

View File

@ -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);
},