0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-24 23:48:13 -05:00

Fixed preview iframe communication error messages

no refs
This commit is contained in:
Rishabh 2021-10-19 13:03:23 +05:30
parent d88914ac0a
commit 54f5f659f7

View file

@ -265,7 +265,7 @@ export default class MembersAccessController extends Controller {
}
const resizeEvents = ['portal-ready', 'portal-preview-updated'];
if (resizeEvents.includes(event.data.type) && event.data.payload?.height) {
if (resizeEvents.includes(event.data.type) && event.data.payload?.height && this.portalPreviewIframe.parentNode) {
this.portalPreviewIframe.parentNode.style.height = `${event.data.payload.height}px`;
}
};