From 588d67ecb5c4ae7f4899d7ab8e928cbe1c67d62a Mon Sep 17 00:00:00 2001 From: Grzegorz Lachowski Date: Sun, 10 Nov 2013 23:47:37 +0100 Subject: [PATCH] fix(ngAnimate): fix TypeError in animateSetup Fix TypeError in animateSetup on deletion of repeated element when using ng-include. Added nodeType check to ensure we operate on element node. Closes #4871 --- src/ngAnimate/animate.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/ngAnimate/animate.js b/src/ngAnimate/animate.js index 3b3c29b92990..f794e5360cf2 100644 --- a/src/ngAnimate/animate.js +++ b/src/ngAnimate/animate.js @@ -967,7 +967,9 @@ angular.module('ngAnimate', ['ng']) if(timings.transitionDuration > 0) { element.addClass(NG_ANIMATE_FALLBACK_CLASS_NAME); activeClassName += NG_ANIMATE_FALLBACK_ACTIVE_CLASS_NAME + ' '; - node.style[TRANSITION_PROP + PROPERTY_KEY] = 'none'; + if (node.nodeType == ELEMENT_NODE) { + node.style[TRANSITION_PROP + PROPERTY_KEY] = 'none'; + } } forEach(className.split(' '), function(klass, i) {