mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-09-03 04:38:33 +00:00
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.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user