fix(editor): Fix issue preventing execution preview loading when in an iframe (#5817)

This commit is contained in:
Jon 2023-03-30 12:17:12 +01:00 committed by GitHub
parent 6f720919c9
commit d86e693019
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -3885,8 +3885,8 @@ export default mixins(
this.bindCanvasEvents();
} catch {} // This will break if mounted after jsplumb has been initiated from executions preview, so continue if it breaks
await this.initView();
if (window.top) {
window.top.postMessage(
if (window.parent) {
window.parent.postMessage(
JSON.stringify({ command: 'n8nReady', version: this.rootStore.versionCli }),
'*',
);