mirror of
https://github.com/n8n-io/n8n.git
synced 2024-12-25 20:54:07 -08:00
fix(editor): Fix an issue where some node actions wouldn't select default params correctly (#4946)
This commit is contained in:
parent
6b83972f6e
commit
626879b3a2
|
@ -33,10 +33,12 @@ import {
|
||||||
INodeCredentialsDetails,
|
INodeCredentialsDetails,
|
||||||
INodeExecutionData,
|
INodeExecutionData,
|
||||||
INodeIssueData,
|
INodeIssueData,
|
||||||
|
INodeParameters,
|
||||||
IPinData,
|
IPinData,
|
||||||
IRunData,
|
IRunData,
|
||||||
ITaskData,
|
ITaskData,
|
||||||
IWorkflowSettings,
|
IWorkflowSettings,
|
||||||
|
NodeHelpers,
|
||||||
} from 'n8n-workflow';
|
} from 'n8n-workflow';
|
||||||
import Vue from 'vue';
|
import Vue from 'vue';
|
||||||
|
|
||||||
|
@ -824,8 +826,18 @@ export const useWorkflowsStore = defineStore(STORES.WORKFLOWS, {
|
||||||
const latestNode = this.workflow.nodes.findLast(
|
const latestNode = this.workflow.nodes.findLast(
|
||||||
(node) => node.type === updateInformation.key,
|
(node) => node.type === updateInformation.key,
|
||||||
) as INodeUi;
|
) as INodeUi;
|
||||||
|
const nodeType = useNodeTypesStore().getNodeType(latestNode.type);
|
||||||
|
if(!nodeType) return;
|
||||||
|
|
||||||
if (latestNode) this.setNodeParameters({ ...updateInformation, name: latestNode.name }, true);
|
const nodeParams = NodeHelpers.getNodeParameters(
|
||||||
|
nodeType.properties,
|
||||||
|
updateInformation.value as INodeParameters,
|
||||||
|
true,
|
||||||
|
false,
|
||||||
|
latestNode,
|
||||||
|
);
|
||||||
|
|
||||||
|
if (latestNode) this.setNodeParameters({ value: nodeParams, name: latestNode.name }, true);
|
||||||
},
|
},
|
||||||
|
|
||||||
addNodeExecutionData(pushData: IPushDataNodeExecuteAfter): void {
|
addNodeExecutionData(pushData: IPushDataNodeExecuteAfter): void {
|
||||||
|
|
Loading…
Reference in a new issue