From bec614fd90c48c3921a4b659912008574e553b40 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 11a86f3f..113bacc5 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