mirror of
https://github.com/zhigang1992/angular.js.git
synced 2026-04-09 17:10:34 +08:00
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
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user