diff options
| author | Igor Minar | 2012-10-25 00:58:50 -0700 |
|---|---|---|
| committer | Igor Minar | 2012-10-29 17:49:36 -0700 |
| commit | 008a782bc8ed8a7ebcb63d563d1420fd1b312452 (patch) | |
| tree | 28e03255d52ba3aee53da9d969aca0665b147266 /src | |
| parent | 524c5c8b5d84ccec0edf1ded304b79f44968ca09 (diff) | |
| download | angular.js-008a782bc8ed8a7ebcb63d563d1420fd1b312452.tar.bz2 | |
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
Diffstat (limited to 'src')
| -rw-r--r-- | src/ng/compile.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ng/compile.js b/src/ng/compile.js index 1ee0fc6f..fd431849 100644 --- a/src/ng/compile.js +++ b/src/ng/compile.js @@ -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); |
