aboutsummaryrefslogtreecommitdiffstats
path: root/src/ngAnimate
diff options
context:
space:
mode:
authorIgor Minar2013-11-06 15:01:01 -0800
committerIgor Minar2013-11-08 01:03:17 -0800
commit5cfacec499e77e464a81c7ebe4b6f240da1e8748 (patch)
tree1416740869fe607af02b41725e8def242f5c09d0 /src/ngAnimate
parent1df3da361d62726bf1dafe629a7fca845b6a8733 (diff)
downloadangular.js-5cfacec499e77e464a81c7ebe4b6f240da1e8748.tar.bz2
refactor($animate): speed up animationsDisabled check
Diffstat (limited to 'src/ngAnimate')
-rw-r--r--src/ngAnimate/animate.js2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/ngAnimate/animate.js b/src/ngAnimate/animate.js
index 72c29cc3..a738987a 100644
--- a/src/ngAnimate/animate.js
+++ b/src/ngAnimate/animate.js
@@ -754,6 +754,8 @@ angular.module('ngAnimate', ['ng'])
}
function animationsDisabled(element, parentElement) {
+ if (rootAnimateState.disabled) return true;
+
if(element[0] == $rootElement[0]) {
return rootAnimateState.disabled || rootAnimateState.running;
}