Skip to content

Commit 0a56ace

Browse files
committed
fix(compiler): skip signal-child cache when host may receive dangerouslySetInnerHTML
The compilerCacheArray optimization around bindSignalChild could skip the child binding entirely on a cache hit. Hosts with a spread or dangerouslySetInnerHTML then missed childTextHole's mutual-exclusion check, allowing a raw-HTML writer to activate beside still-mounted children. Add the same potentialDangerouslySetInnerHTML guard the ordinary only-child path uses so the signal-capable binding always runs for innerHTML-eligible hosts.
1 parent f702046 commit 0a56ace

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎packages/octane/src/compiler/compile.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27537,7 +27537,7 @@ function planJsx(
2753727537
),
2753827538
),
2753927539
);
27540-
if (cc.onlyChildText && cc.autoMemoValue === true) {
27540+
if (cc.onlyChildText && cc.autoMemoValue === true && !cc.potentialDangerouslySetInnerHTML) {
2754127541
// A calculated value can still hold a signal handle, so it keeps the
2754227542
// signal-capable binding. Only an unchanged compiler-owned plain data
2754327543
// array may skip it, exactly as on the ordinary only-child path below;

0 commit comments

Comments
 (0)