Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit 008a782

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 524c5c8 commit 008a782

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/ng/compile.js

+1-1
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)