Skip to content

Commit d10b2f4

Browse files
committed
fix(core): only rebind timelines when late arrivals were actually detected
The late-bind polling was unconditionally rebinding on its first check even when all timelines were already present, causing visual regressions across style-prod tests. Now tracks sawMissing flag — only rebinds if the poll previously detected missing timelines that subsequently appeared. Compositions with synchronous timeline registration exit the poll immediately with no side effects.
1 parent 04c35ce commit d10b2f4

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

packages/core/src/runtime/init.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1471,6 +1471,7 @@ export function initSandboxRuntimeModular(): void {
14711471
postState(true);
14721472

14731473
let lateBindChecks = 0;
1474+
let sawMissing = false;
14741475
const lateBindInterval = setInterval(() => {
14751476
if (++lateBindChecks > 50) {
14761477
clearInterval(lateBindInterval);
@@ -1482,10 +1483,11 @@ export function initSandboxRuntimeModular(): void {
14821483
const id = hosts[i].getAttribute("data-composition-id");
14831484
if (id && !timelines[id]) {
14841485
allBound = false;
1486+
sawMissing = true;
14851487
break;
14861488
}
14871489
}
1488-
if (allBound && lateBindChecks > 1) {
1490+
if (allBound && !sawMissing) {
14891491
clearInterval(lateBindInterval);
14901492
return;
14911493
}

0 commit comments

Comments
 (0)