Skip to content

Write HTML. Render video. Built for agents.

fix(core): only rebind timelines when late arrivals were actually detected

Miguel Ángeld10b2f4dedc1
diff --git a/packages/core/src/runtime/init.ts b/packages/core/src/runtime/init.ts
index b0f83e0ff1..12007ed3c6 100644
--- a/packages/core/src/runtime/init.ts
+++ b/packages/core/src/runtime/init.ts
@@ -1471,6 +1471,7 @@ export function initSandboxRuntimeModular(): void {
postState(true);
let lateBindChecks = 0;
+ let sawMissing = false;
const lateBindInterval = setInterval(() => {
if (++lateBindChecks > 50) {
clearInterval(lateBindInterval);
@@ -1482,10 +1483,11 @@ export function initSandboxRuntimeModular(): void {
const id = hosts[i].getAttribute("data-composition-id");
if (id && !timelines[id]) {
allBound = false;
+ sawMissing = true;
break;
}
}
- if (allBound && lateBindChecks > 1) {
+ if (allBound && !sawMissing) {
clearInterval(lateBindInterval);
return;
}