From 98029379aab8aa880f95abb880f0b2857fdbfdcc Mon Sep 17 00:00:00 2001 From: Pascal Date: Thu, 31 Jan 2013 15:42:00 +0100 Subject: [PATCH] Fixing angular crash on in DOM, which doesn't necessarily have a childNodes attribute --- src/ng/compile.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ng/compile.js b/src/ng/compile.js index 13f8ae7ef62b..88eff03eaf4b 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 || !nodeList[i].childNodes.length) + childLinkFn = (nodeLinkFn && nodeLinkFn.terminal || !nodeList[i].childNodes || !nodeList[i].childNodes.length) ? null : compileNodes(nodeList[i].childNodes, nodeLinkFn ? nodeLinkFn.transclude : transcludeFn);