fix(ivy): avoid DOM element assertions if procedural renderer is used (#33156)

Prior to this commit, Ivy runtime asserted that a given element is an instance of a DOM node. These asserts may not be correct in case custom renderer is used, which operates objects with a shape different than DOM nodes. This commit updates the code to avoid the mentioned checks in case procedural renderer is used.

PR Close #33156
This commit is contained in:
Andrew Kushnir
2019-10-14 14:46:26 -07:00
committed by Miško Hevery
parent ec6a9f2a02
commit 11e04b1892
4 changed files with 52 additions and 6 deletions

View File

@ -93,7 +93,7 @@ function applyToElementOrContainer(
lNodeToHandle = lNodeToHandle[HOST] !;
}
const rNode: RNode = unwrapRNode(lNodeToHandle);
ngDevMode && assertDomNode(rNode);
ngDevMode && !isProceduralRenderer(renderer) && assertDomNode(rNode);
if (action === WalkTNodeTreeAction.Create && parent !== null) {
if (beforeNode == null) {