renderer - Store nextParentASTNode separately

This commit is contained in:
2019-12-21 15:58:28 +05:30
parent 13cf92ffff
commit 4148ef7ba4
+3 -2
View File
@@ -23,6 +23,7 @@ function render(
} else { } else {
parentASTNodeMod = parentASTNode; parentASTNodeMod = parentASTNode;
} }
let nextParentASTNode = parentASTNodeMod;
if (node === null || node === undefined) { if (node === null || node === undefined) {
// Handle (skip) null and undefined nodes // Handle (skip) null and undefined nodes
@@ -70,7 +71,7 @@ function render(
processChildren = false; processChildren = false;
} else { } else {
processChildren = true; processChildren = true;
parentASTNodeMod = newParentASTNode; nextParentASTNode = newParentASTNode;
} }
} }
@@ -83,7 +84,7 @@ function render(
children children
) as ReactElementSubsetWithPrimitive[]; ) as ReactElementSubsetWithPrimitive[];
render(renderOutput, parentASTNodeMod); render(renderOutput, nextParentASTNode);
} }
} }