mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-16 17:46:45 +00:00
fix(core): Avoid using structuredClone on node descriptions (#13832)
This commit is contained in:
committed by
GitHub
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))
|
||||
|
||||
Reference in New Issue
Block a user