diff --git a/javascript/src/iframe/viamapi-iframe.js b/javascript/src/iframe/viamapi-iframe.js index f96df4b886d368a0c367c60f74d09178c170cc67..3e55cef7d07481916785eb83efbe2b48a53ae5ef 100644 --- a/javascript/src/iframe/viamapi-iframe.js +++ b/javascript/src/iframe/viamapi-iframe.js @@ -1566,7 +1566,7 @@ const connection = Penpal.connectToParent({ parts = []; } - if (htmlBody) { + if (htmlBody || htmlBody === "") { if (typeof htmlBody !== "string") { throw new Error("htmlBody is not string"); // should not happen } @@ -1583,7 +1583,7 @@ const connection = Penpal.connectToParent({ }); } - if (textBody) { + if (textBody || textBody === "") { if (typeof textBody !== "string") { throw new Error("textBody is not string"); // should not happen }