Skip to content

Commit

Permalink
fix(ngAnimate): fix TypeError in animateSetup
Browse files Browse the repository at this point in the history
Fix TypeError in animateSetup on deletion of repeated element when using
ng-include. Added nodeType check to ensure we operate on element node.

Closes angular#4871
  • Loading branch information
gregolsky committed Nov 10, 2013
1 parent c5c7538 commit 588d67e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/ngAnimate/animate.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 588d67e

Please sign in to comment.