From 4759aacba96f2503b1c3d67ce4c5c915f109337b Mon Sep 17 00:00:00 2001 From: Igor Minar Date: Sat, 23 Feb 2013 22:54:35 -0800 Subject: fix($compile): handle elements with no childNodes property see the test for more details --- src/ng/compile.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/ng/compile.js b/src/ng/compile.js index 84a9c3ca..78df5aa8 100644 --- a/src/ng/compile.js +++ b/src/ng/compile.js @@ -433,7 +433,7 @@ function $CompileProvider($provide) { ? applyDirectivesToNode(directives, nodeList[i], attrs, transcludeFn, $rootElement) : null; - childLinkFn = (nodeLinkFn && nodeLinkFn.terminal || !nodeList[i].childNodes.length) + childLinkFn = (nodeLinkFn && nodeLinkFn.terminal || !nodeList[i].childNodes || !nodeList[i].childNodes.length) ? null : compileNodes(nodeList[i].childNodes, nodeLinkFn ? nodeLinkFn.transclude : transcludeFn); -- cgit v1.2.3