mirror of
https://github.com/n8n-io/n8n.git
synced 2026-05-28 15:27:03 +02:00
fix(core): Avoid using structuredClone on node descriptions (#13832)
This commit is contained in:
parent
0d7894f06a
commit
d2df154b49
|
|
@ -26,7 +26,7 @@ import type {
|
|||
IVersionedNodeType,
|
||||
INodeProperties,
|
||||
} from 'n8n-workflow';
|
||||
import { NodeConnectionType, UnexpectedError, UserError } from 'n8n-workflow';
|
||||
import { deepCopy, NodeConnectionType, UnexpectedError, UserError } from 'n8n-workflow';
|
||||
import path from 'path';
|
||||
import picocolors from 'picocolors';
|
||||
|
||||
|
|
@ -315,12 +315,11 @@ export class LoadNodesAndCredentials {
|
|||
this.types.nodes.filter((nodetype) => nodetype.usableAsTool === true);
|
||||
|
||||
for (const usableNode of usableNodes) {
|
||||
const description: INodeTypeBaseDescription | INodeTypeDescription =
|
||||
structuredClone(usableNode);
|
||||
const description = deepCopy(usableNode);
|
||||
const wrapped = this.convertNodeToAiTool({ description }).description;
|
||||
|
||||
this.types.nodes.push(wrapped);
|
||||
this.known.nodes[wrapped.name] = structuredClone(this.known.nodes[usableNode.name]);
|
||||
this.known.nodes[wrapped.name] = { ...this.known.nodes[usableNode.name] };
|
||||
|
||||
const credentialNames = Object.entries(this.known.credentials)
|
||||
.filter(([_, credential]) => credential?.supportedNodes?.includes(usableNode.name))
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user