1
0
Fork 0
mirror of https://github.com/n8n-io/n8n.git synced 2025-03-05 20:50:17 -08:00

fix(editor): Send only execution id in postMessage when previewing an execution ()

This commit is contained in:
Csaba Tuncsik 2024-05-27 12:44:25 +02:00 committed by GitHub
parent 3a2e5455a9
commit 49b5bd70f0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 5 additions and 3 deletions
packages/editor-ui/src

View file

@ -119,7 +119,7 @@ const loadExecution = () => {
iframeRef.value?.contentWindow?.postMessage?.( iframeRef.value?.contentWindow?.postMessage?.(
JSON.stringify({ JSON.stringify({
command: 'setActiveExecution', command: 'setActiveExecution',
execution: executionsStore.activeExecution, executionId: executionsStore.activeExecution.id,
}), }),
'*', '*',
); );

View file

@ -179,7 +179,7 @@ describe('WorkflowPreview', () => {
expect(postMessageSpy).toHaveBeenCalledWith( expect(postMessageSpy).toHaveBeenCalledWith(
JSON.stringify({ JSON.stringify({
command: 'setActiveExecution', command: 'setActiveExecution',
execution: { id: 'abc' }, executionId: 'abc',
}), }),
'*', '*',
); );

View file

@ -4765,7 +4765,9 @@ export default defineComponent({
}); });
} }
} else if (json?.command === 'setActiveExecution') { } else if (json?.command === 'setActiveExecution') {
this.executionsStore.activeExecution = json.execution; this.executionsStore.activeExecution = (await this.executionsStore.fetchExecution(
json.executionId,
)) as ExecutionSummary;
} }
} catch (e) {} } catch (e) {}
}, },