fix(core): guard element stamping to iframe-only (Studio preview)

This commit is contained in:
Miguel Ángel
2026-06-09 23:34:08 +00:00
parent 02475ce9f7
commit 192417b7cd
+3 -1
View File
@@ -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);