fix(XML Node): Fix issue with not returning valid data (#6565)

This commit is contained in:
Jan Oberhauser
2023-06-29 15:30:39 +02:00
committed by कारतोफ्फेलस्क्रिप्ट™
parent 8f244df0f9
commit c2b9d5ac50
2 changed files with 136 additions and 2 deletions

View File

@@ -5,7 +5,7 @@ import type {
INodeType,
INodeTypeDescription,
} from 'n8n-workflow';
import { NodeOperationError } from 'n8n-workflow';
import { NodeOperationError, deepCopy } from 'n8n-workflow';
export class Xml implements INodeType {
description: INodeTypeDescription = {
@@ -249,7 +249,7 @@ export class Xml implements INodeType {
}
const json = await parser.parseStringPromise(item.json[dataPropertyName] as string);
returnData.push({ json });
returnData.push({ json: deepCopy(json) });
} else if (mode === 'jsonToxml') {
const builder = new Builder(options);