fix(editor): Fix deletion of last execution at execution preview (#7883)

https://linear.app/n8n/issue/PAY-1062
This commit is contained in:
Iván Ovejero
2023-11-30 12:12:26 +01:00
committed by GitHub
parent e834f14991
commit ce2d388f05
3 changed files with 22 additions and 2 deletions

View File

@@ -282,6 +282,7 @@ export default defineComponent({
this.executions[0];
await this.workflowsStore.deleteExecutions({ ids: [this.$route.params.executionId] });
this.workflowsStore.deleteExecution(this.executions[executionIndex]);
if (this.temporaryExecution?.id === this.$route.params.executionId) {
this.temporaryExecution = null;
}
@@ -293,6 +294,7 @@ export default defineComponent({
})
.catch(() => {});
this.workflowsStore.activeWorkflowExecution = nextExecution;
await this.setExecutions();
} else {
// If there are no executions left, show empty state and clear active execution from the store
this.workflowsStore.activeWorkflowExecution = null;
@@ -301,7 +303,6 @@ export default defineComponent({
params: { name: this.currentWorkflow },
});
}
await this.setExecutions();
} catch (error) {
this.loading = false;
this.showError(