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

View File

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