fix(editor): Fix route component caching, incorrect use of array reduce method and enable WF history feature (#7434)
Co-authored-by: Giulio Andreini <andreini@netseven.it>
This commit is contained in:
@@ -90,7 +90,13 @@ export const useWorkflowHistoryStore = defineStore('workflowHistory', () => {
|
||||
updateData.active = false;
|
||||
}
|
||||
|
||||
return workflowsStore.updateWorkflow(workflowId, updateData, true);
|
||||
return workflowsStore.updateWorkflow(workflowId, updateData, true).catch(async (error) => {
|
||||
if (error.httpStatusCode === 400 && error.message.includes('can not be activated')) {
|
||||
return workflowsStore.fetchWorkflow(workflowId);
|
||||
} else {
|
||||
throw new Error(error);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user