From 5cfacec499e77e464a81c7ebe4b6f240da1e8748 Mon Sep 17 00:00:00 2001 From: Igor Minar Date: Wed, 6 Nov 2013 15:01:01 -0800 Subject: refactor($animate): speed up animationsDisabled check --- src/ngAnimate/animate.js | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src') 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; } -- cgit v1.2.3