mirror of
https://github.com/n8n-io/n8n.git
synced 2025-03-05 20:50:17 -08:00
fix(editor): fix pairedItem
in combination with pinned data (#4257)
🐛 Fix `pairedItem` in combination with pinned data
This commit is contained in:
parent
a751fd3ce7
commit
e30c78febe
|
@ -78,6 +78,19 @@ export const workflowHelpers = mixins(
|
|||
// which does not use the node name
|
||||
const parentNodeName = parentNode[0];
|
||||
|
||||
const parentPinData = this.$store.getters.pinData[parentNodeName];
|
||||
|
||||
// populate `executeData` from `pinData`
|
||||
|
||||
if (parentPinData) {
|
||||
executeData.data = { main: [parentPinData] };
|
||||
executeData.source = { main: [{ previousNode: parentNodeName }] };
|
||||
|
||||
return executeData;
|
||||
}
|
||||
|
||||
// populate `executeData` from `runData`
|
||||
|
||||
const workflowRunData = this.$store.getters.getWorkflowRunData as IRunData | null;
|
||||
if (workflowRunData === null) {
|
||||
return executeData;
|
||||
|
|
|
@ -668,10 +668,18 @@ export class WorkflowDataProxy {
|
|||
};
|
||||
}
|
||||
|
||||
const previousNodeHasPinData =
|
||||
sourceData && this.workflow.getPinDataOfNode(sourceData.previousNode) !== undefined;
|
||||
|
||||
let currentPairedItem = pairedItem;
|
||||
|
||||
let nodeBeforeLast: string | undefined;
|
||||
while (sourceData !== null && destinationNodeName !== sourceData.previousNode) {
|
||||
|
||||
while (
|
||||
!previousNodeHasPinData &&
|
||||
sourceData !== null &&
|
||||
destinationNodeName !== sourceData.previousNode
|
||||
) {
|
||||
taskData =
|
||||
that.runExecutionData!.resultData.runData[sourceData.previousNode][
|
||||
sourceData?.previousNodeRun || 0
|
||||
|
|
Loading…
Reference in a new issue