Skip to content

Commit

Permalink
fix(editor): Fix stuck loading states (#3428)
Browse files Browse the repository at this point in the history
  • Loading branch information
mutdmour authored Jun 2, 2022
1 parent 15a20d2 commit 450a9aa
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions packages/editor-ui/src/components/InputPanel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,9 @@ export default mixins(
},
computed: {
isExecutingPrevious(): boolean {
if (!this.workflowRunning) {
return false;
}
const triggeredNode = this.$store.getters.executedNode;
const executingNode = this.$store.getters.executingNode;
if (this.activeNode && triggeredNode === this.activeNode.name && this.activeNode.name !== executingNode) {
Expand All @@ -103,6 +106,9 @@ export default mixins(
}
return false;
},
workflowRunning (): boolean {
return this.$store.getters.isActionActive('workflowRunning');
},
currentWorkflow(): Workflow {
return this.workflow as Workflow;
},
Expand Down
2 changes: 1 addition & 1 deletion packages/editor-ui/src/components/NodeExecuteButton.vue
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export default mixins(
nodeRunning (): boolean {
const triggeredNode = this.$store.getters.executedNode;
const executingNode = this.$store.getters.executingNode;
return executingNode === this.node.name || triggeredNode === this.node.name;
return this.workflowRunning && (executingNode === this.node.name || triggeredNode === this.node.name);
},
workflowRunning (): boolean {
return this.$store.getters.isActionActive('workflowRunning');
Expand Down

0 comments on commit 450a9aa

Please sign in to comment.