fix($animate): use direct DOM comparison when checking for $rootElement

Closes #4679
This commit is contained in:
Matias Niemelä 2013-10-28 21:44:06 -07:00
parent 7f0767acab
commit d434eabec3
2 changed files with 6 additions and 1 deletions

View file

@ -697,7 +697,7 @@ angular.module('ngAnimate', ['ng'])
}
function animationsDisabled(element, parent) {
if(element == $rootElement) {
if(element[0] == $rootElement[0]) {
return rootAnimateState.disabled || rootAnimateState.running;
}

View file

@ -96,6 +96,11 @@ describe("ngAnimate", function() {
$animate.addClass(elm2, 'klass2');
expect(count).toBe(2);
var root = angular.element($rootElement[0]);
$rootElement.addClass('animated');
$animate.addClass(root, 'klass2');
expect(count).toBe(3);
});
});