mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-11-14 13:27:13 +00:00
The previous fix (propagating comp-id to host) broke flex centering: CSS like display:flex;align-items:center targets the host, but .label is a grandchild (host > inner-root > label) so flex centering doesn't cascade. Better approach: only apply flattenInnerRoot when compId is present on the host. When compId is null, the old outerHTML path already preserved the inner root with all its original attributes (including data-composition-id), so flattenInnerRoot is unnecessary and harmful. This preserves the original fix for James's bug (inner root classes lost when host HAS compId and innerHTML strips the wrapper) while avoiding regressions when the host lacks compId (30 existing regression tests).