fix(core): Fix task runner logging to browser console (#15111)

This commit is contained in:
Iván Ovejero
2025-05-06 09:42:46 +02:00
committed by GitHub
parent 07e6c7e13f
commit e86edf536f
3 changed files with 52 additions and 5 deletions

View File

@@ -20,6 +20,7 @@ import {
ApplicationError,
createDeferredPromise,
createEnvProviderState,
jsonParse,
NodeConnectionTypes,
} from 'n8n-workflow';
@@ -183,7 +184,10 @@ export class ExecuteContext extends BaseExecuteContext implements IExecuteFuncti
logNodeOutput(...args: unknown[]): void {
if (this.mode === 'manual') {
this.sendMessageToUI(...args);
const parsedLogArgs = args.map((arg) =>
typeof arg === 'string' ? jsonParse(arg, { fallbackValue: arg }) : arg,
);
this.sendMessageToUI(...parsedLogArgs);
return;
}