mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 10:31:15 +00:00
fix(editor): Fix pin data showing up in production executions on new canvas (#11951)
This commit is contained in:
@@ -185,6 +185,7 @@ const {
|
||||
fetchWorkflowDataFromUrl,
|
||||
resetWorkspace,
|
||||
initializeWorkspace,
|
||||
openExecution,
|
||||
editableWorkflow,
|
||||
editableWorkflowObject,
|
||||
lastClickPosition,
|
||||
@@ -1051,30 +1052,18 @@ function trackRunWorkflowToNode(node: INodeUi) {
|
||||
void externalHooks.run('nodeView.onRunNode', telemetryPayload);
|
||||
}
|
||||
|
||||
async function openExecution(executionId: string) {
|
||||
async function onOpenExecution(executionId: string) {
|
||||
canvasStore.startLoading();
|
||||
|
||||
resetWorkspace();
|
||||
|
||||
let data: IExecutionResponse | undefined;
|
||||
try {
|
||||
data = await workflowsStore.getExecution(executionId);
|
||||
} catch (error) {
|
||||
toast.showError(error, i18n.baseText('nodeView.showError.openExecution.title'));
|
||||
return;
|
||||
}
|
||||
if (data === undefined) {
|
||||
throw new Error(`Execution with id "${executionId}" could not be found!`);
|
||||
}
|
||||
|
||||
await initializeData();
|
||||
|
||||
initializeWorkspace(data.workflowData);
|
||||
const data = await openExecution(executionId);
|
||||
if (!data) {
|
||||
return;
|
||||
}
|
||||
|
||||
workflowsStore.setWorkflowExecutionData(data);
|
||||
|
||||
uiStore.stateIsDirty = false;
|
||||
canvasStore.stopLoading();
|
||||
|
||||
fitView();
|
||||
|
||||
canvasEventBus.emit('open:execution', data);
|
||||
@@ -1320,7 +1309,7 @@ async function onPostMessageReceived(messageEvent: MessageEvent) {
|
||||
// so everything it needs has to be sent using post messages and passed down to child components
|
||||
isProductionExecutionPreview.value = json.executionMode !== 'manual';
|
||||
|
||||
await openExecution(json.executionId);
|
||||
await onOpenExecution(json.executionId);
|
||||
canOpenNDV.value = json.canOpenNDV ?? true;
|
||||
hideNodeIssues.value = json.hideNodeIssues ?? false;
|
||||
isExecutionPreview.value = true;
|
||||
|
||||
Reference in New Issue
Block a user