fix(editor): fix workflow not stopping on clicking stop button (#4382)

* fix(editor): fix workflow not stopping

* address comment, fix for unsaved workflows
This commit is contained in:
Mutasem Aldmour
2022-10-19 15:20:33 +02:00
committed by GitHub
parent 263794ce40
commit 50c18a789a
4 changed files with 5 additions and 5 deletions

View File

@@ -260,7 +260,7 @@ export const pushConnection = mixins(
this.$titleSet(workflow.name as string, 'ERROR');
if (
runDataExecuted.data.resultData.error!.name === 'ExpressionError' &&
runDataExecuted.data.resultData.error?.name === 'ExpressionError' &&
(runDataExecuted.data.resultData.error as ExpressionError).context.functionality === 'pairedItem'
) {
const error = runDataExecuted.data.resultData.error as ExpressionError;

View File

@@ -129,9 +129,9 @@ export const restApi = Vue.extend({
},
// Returns the execution with the given name
getExecution: async (id: string): Promise<IExecutionResponse> => {
getExecution: async (id: string): Promise<IExecutionResponse | undefined> => {
const response = await self.restApi().makeRestApiRequest('GET', `/executions/${id}`);
return unflattenExecutionData(response);
return response && unflattenExecutionData(response);
},
// Deletes executions