mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-09-03 04:38:33 +00:00
fix(core): guard element stamping to iframe-only (Studio preview)
This commit is contained in:
@@ -982,7 +982,9 @@ export function initSandboxRuntimeModular(): void {
|
||||
});
|
||||
// Stamp data-start / data-duration on GSAP-targeted elements that lack
|
||||
// them so the Studio timeline can discover individual animated elements.
|
||||
{
|
||||
// Only when embedded in an iframe (Studio preview) — production renders
|
||||
// run as the top-level page and must not mutate element timing.
|
||||
if (window.parent !== window) {
|
||||
const rootComp = resolveRootCompositionElement();
|
||||
const rootDuration = boundDuration > 0 ? boundDuration : 0;
|
||||
const dur = String(rootDuration > 0 ? rootDuration : 1);
|
||||
|
||||
Reference in New Issue
Block a user