Skip to content

Commit 9bff5c6

Browse files
committed
fix($compile): compilation should not recurse into empty nodes
if a node doesn't have children then don't try to compile these non-existent children
1 parent 3ba008d commit 9bff5c6

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/ng/compile.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -380,7 +380,7 @@ function $CompileProvider($provide) {
380380
? applyDirectivesToNode(directives, nodeList[i], attrs, transcludeFn, $rootElement)
381381
: null;
382382

383-
childLinkFn = (nodeLinkFn && nodeLinkFn.terminal)
383+
childLinkFn = (nodeLinkFn && nodeLinkFn.terminal || !nodeList[i].childNodes.length)
384384
? null
385385
: compileNodes(nodeList[i].childNodes,
386386
nodeLinkFn ? nodeLinkFn.transclude : transcludeFn);

0 commit comments

Comments
 (0)