From 858cf5e438afbfb734c8a7385ae44916c7f7f10a Mon Sep 17 00:00:00 2001 From: meganrogge Date: Thu, 9 Nov 2023 11:42:34 -0800 Subject: [PATCH] fix #187451 --- src/vs/workbench/api/common/extHostTask.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/vs/workbench/api/common/extHostTask.ts b/src/vs/workbench/api/common/extHostTask.ts index 49d668916a7..9489576cd03 100644 --- a/src/vs/workbench/api/common/extHostTask.ts +++ b/src/vs/workbench/api/common/extHostTask.ts @@ -746,7 +746,8 @@ export class WorkerExtHostTask extends ExtHostTaskBase { for (const task of value) { this.checkDeprecation(task, handler); if (!task.definition || !validTypes[task.definition.type]) { - this._logService.warn(`The task [${task.source}, ${task.name}] uses an undefined task type. The task will be ignored in the future.`); + const source = task.source ? task.source : 'No task source'; + this._logService.warn(`The task [${source}, ${task.name}] uses an undefined task type. The task will be ignored in the future.`); } const taskDTO: tasks.ITaskDTO | undefined = TaskDTO.from(task, handler.extension);