From 8ec265492c01798b52b007a1be94658f3420a3eb Mon Sep 17 00:00:00 2001 From: Oleg Korshul Date: Tue, 7 Feb 2023 15:11:46 +0300 Subject: [PATCH] Fix bug with double messages from editor --- apps/api/documents/api.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/api/documents/api.js b/apps/api/documents/api.js index a918760138..96c9dfed50 100644 --- a/apps/api/documents/api.js +++ b/apps/api/documents/api.js @@ -388,7 +388,7 @@ if ( msg ) { if ( msg.type === "onExternalPluginMessage" ) { _sendCommand(msg); - } else if (msg.type === "onExternalPluginMessageCallback") { + } else if ((window.parent !== window) && msg.type === "onExternalPluginMessageCallback") { postMessage(window.parent, msg); } else if ( msg.frameEditorId == placeholderId ) {