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

Commit

Permalink
fix($compile): compilation should not recurse into empty nodes
Browse files Browse the repository at this point in the history
if a node doesn't have children then don't try to compile these non-existent children
  • Loading branch information
IgorMinar committed Oct 30, 2012
1 parent 524c5c8 commit 008a782
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ng/compile.js
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@ function $CompileProvider($provide) {
? applyDirectivesToNode(directives, nodeList[i], attrs, transcludeFn, $rootElement)
: null;

childLinkFn = (nodeLinkFn && nodeLinkFn.terminal)
childLinkFn = (nodeLinkFn && nodeLinkFn.terminal || !nodeList[i].childNodes.length)
? null
: compileNodes(nodeList[i].childNodes,
nodeLinkFn ? nodeLinkFn.transclude : transcludeFn);
Expand Down

0 comments on commit 008a782

Please sign in to comment.