updated stuff
This commit is contained in:
@@ -110,12 +110,9 @@ export function LiveArtboard({
|
|||||||
// origin loads as a Spectre mitigation).
|
// origin loads as a Spectre mitigation).
|
||||||
const data = event.data as { __om_init_request?: boolean } | null;
|
const data = event.data as { __om_init_request?: boolean } | null;
|
||||||
if (data && data.__om_init_request === true) {
|
if (data && data.__om_init_request === true) {
|
||||||
const iframe = iframeRef.current;
|
const win = iframeRef.current?.contentWindow;
|
||||||
if (iframe && iframe.contentWindow === event.source) {
|
if (win && win === event.source) {
|
||||||
iframe.contentWindow.postMessage(
|
win.postMessage({ __om_init_response: true, artboardId: id }, '*');
|
||||||
{ __om_init_response: true, artboardId: id },
|
|
||||||
'*',
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user