mirror of
https://github.com/n8n-io/n8n.git
synced 2025-03-05 20:50:17 -08:00
fix(editor): fix broken output panel for wait node executions (#4156)
This commit is contained in:
parent
e2cdb2e5d7
commit
40ebbeaefc
|
@ -353,7 +353,7 @@ export interface IExecutionPushResponse {
|
||||||
|
|
||||||
export interface IExecutionResponse extends IExecutionBase {
|
export interface IExecutionResponse extends IExecutionBase {
|
||||||
id: string;
|
id: string;
|
||||||
data: IRunExecutionData;
|
data?: IRunExecutionData;
|
||||||
workflowData: IWorkflowDb;
|
workflowData: IWorkflowDb;
|
||||||
executedNode?: string;
|
executedNode?: string;
|
||||||
}
|
}
|
||||||
|
|
|
@ -62,7 +62,7 @@ export default mixins(
|
||||||
const executionData = this.$store.getters.getWorkflowExecution as IExecutionResponse | null;
|
const executionData = this.$store.getters.getWorkflowExecution as IExecutionResponse | null;
|
||||||
|
|
||||||
let runExecutionData: IRunExecutionData;
|
let runExecutionData: IRunExecutionData;
|
||||||
if (executionData === null) {
|
if (!executionData || !executionData.data) {
|
||||||
runExecutionData = {
|
runExecutionData = {
|
||||||
resultData: {
|
resultData: {
|
||||||
runData: {},
|
runData: {},
|
||||||
|
|
|
@ -261,7 +261,7 @@ export default mixins(
|
||||||
if (this.workflowExecution === null) {
|
if (this.workflowExecution === null) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
const executionData: IRunExecutionData = this.workflowExecution.data;
|
const executionData: IRunExecutionData | undefined = this.workflowExecution.data;
|
||||||
if (executionData && executionData.resultData) {
|
if (executionData && executionData.resultData) {
|
||||||
return executionData.resultData.runData;
|
return executionData.resultData.runData;
|
||||||
}
|
}
|
||||||
|
|
|
@ -142,7 +142,10 @@ export default mixins(
|
||||||
if (this.workflowExecution === null) {
|
if (this.workflowExecution === null) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
const executionData: IRunExecutionData = this.workflowExecution.data;
|
const executionData: IRunExecutionData | undefined = this.workflowExecution.data;
|
||||||
|
if (!executionData || !executionData.resultData || !executionData.resultData.runData) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
return executionData.resultData.runData;
|
return executionData.resultData.runData;
|
||||||
},
|
},
|
||||||
hasNodeRun(): boolean {
|
hasNodeRun(): boolean {
|
||||||
|
|
|
@ -554,7 +554,7 @@ export default mixins(
|
||||||
if (this.workflowExecution === null) {
|
if (this.workflowExecution === null) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
const executionData: IRunExecutionData = this.workflowExecution.data;
|
const executionData: IRunExecutionData | undefined = this.workflowExecution.data;
|
||||||
if (executionData && executionData.resultData) {
|
if (executionData && executionData.resultData) {
|
||||||
return executionData.resultData.runData;
|
return executionData.resultData.runData;
|
||||||
}
|
}
|
||||||
|
|
|
@ -506,7 +506,7 @@ export default mixins(
|
||||||
const currentNodeData: IVariableSelectorOption[] = [];
|
const currentNodeData: IVariableSelectorOption[] = [];
|
||||||
|
|
||||||
let tempOptions: IVariableSelectorOption[];
|
let tempOptions: IVariableSelectorOption[];
|
||||||
if (executionData !== null) {
|
if (executionData !== null && executionData.data !== undefined) {
|
||||||
const runExecutionData: IRunExecutionData = executionData.data;
|
const runExecutionData: IRunExecutionData = executionData.data;
|
||||||
|
|
||||||
tempOptions = this.getNodeContext(this.workflow, runExecutionData, parentNode, activeNode.name, filterText) as IVariableSelectorOption[];
|
tempOptions = this.getNodeContext(this.workflow, runExecutionData, parentNode, activeNode.name, filterText) as IVariableSelectorOption[];
|
||||||
|
@ -657,7 +657,7 @@ export default mixins(
|
||||||
} as IVariableSelectorOption,
|
} as IVariableSelectorOption,
|
||||||
];
|
];
|
||||||
|
|
||||||
if (executionData !== null) {
|
if (executionData !== null && executionData.data !== undefined) {
|
||||||
const runExecutionData: IRunExecutionData = executionData.data;
|
const runExecutionData: IRunExecutionData = executionData.data;
|
||||||
|
|
||||||
parentNode = this.workflow.getParentNodes(nodeName, inputName, 1);
|
parentNode = this.workflow.getParentNodes(nodeName, inputName, 1);
|
||||||
|
|
|
@ -534,7 +534,7 @@ export const workflowHelpers = mixins(
|
||||||
let connectionInputData = this.connectionInputData(parentNode, activeNode.name, inputName, runIndexParent, nodeConnection);
|
let connectionInputData = this.connectionInputData(parentNode, activeNode.name, inputName, runIndexParent, nodeConnection);
|
||||||
|
|
||||||
let runExecutionData: IRunExecutionData;
|
let runExecutionData: IRunExecutionData;
|
||||||
if (executionData === null) {
|
if (executionData === null || !executionData.data) {
|
||||||
runExecutionData = {
|
runExecutionData = {
|
||||||
resultData: {
|
resultData: {
|
||||||
runData: {},
|
runData: {},
|
||||||
|
|
|
@ -363,7 +363,7 @@ export const store = new Vuex.Store({
|
||||||
state.stateIsDirty = true;
|
state.stateIsDirty = true;
|
||||||
// If node has any WorkflowResultData rename also that one that the data
|
// If node has any WorkflowResultData rename also that one that the data
|
||||||
// does still get displayed also after node got renamed
|
// does still get displayed also after node got renamed
|
||||||
if (state.workflowExecutionData !== null && state.workflowExecutionData.data.resultData.runData.hasOwnProperty(nameData.old)) {
|
if (state.workflowExecutionData !== null && state.workflowExecutionData.data && state.workflowExecutionData.data.resultData.runData.hasOwnProperty(nameData.old)) {
|
||||||
state.workflowExecutionData.data.resultData.runData[nameData.new] = state.workflowExecutionData.data.resultData.runData[nameData.old];
|
state.workflowExecutionData.data.resultData.runData[nameData.new] = state.workflowExecutionData.data.resultData.runData[nameData.old];
|
||||||
delete state.workflowExecutionData.data.resultData.runData[nameData.old];
|
delete state.workflowExecutionData.data.resultData.runData[nameData.old];
|
||||||
}
|
}
|
||||||
|
@ -636,7 +636,7 @@ export const store = new Vuex.Store({
|
||||||
state.workflowExecutionData = workflowResultData;
|
state.workflowExecutionData = workflowResultData;
|
||||||
},
|
},
|
||||||
addNodeExecutionData(state, pushData: IPushDataNodeExecuteAfter): void {
|
addNodeExecutionData(state, pushData: IPushDataNodeExecuteAfter): void {
|
||||||
if (state.workflowExecutionData === null) {
|
if (state.workflowExecutionData === null || !state.workflowExecutionData.data) {
|
||||||
throw new Error('The "workflowExecutionData" is not initialized!');
|
throw new Error('The "workflowExecutionData" is not initialized!');
|
||||||
}
|
}
|
||||||
if (state.workflowExecutionData.data.resultData.runData[pushData.nodeName] === undefined) {
|
if (state.workflowExecutionData.data.resultData.runData[pushData.nodeName] === undefined) {
|
||||||
|
@ -645,7 +645,7 @@ export const store = new Vuex.Store({
|
||||||
state.workflowExecutionData.data.resultData.runData[pushData.nodeName].push(pushData.data);
|
state.workflowExecutionData.data.resultData.runData[pushData.nodeName].push(pushData.data);
|
||||||
},
|
},
|
||||||
clearNodeExecutionData(state, nodeName: string): void {
|
clearNodeExecutionData(state, nodeName: string): void {
|
||||||
if (state.workflowExecutionData === null) {
|
if (state.workflowExecutionData === null || !state.workflowExecutionData.data) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue