fix(ngAnimate): guard $document[0].hidden access in case it was mocked out

Some tests mock out  and now that we always access the hidden property, existing
tests can get broken. This change keeps the existing tests working.
This commit is contained in:
Igor Minar
2016-05-17 12:47:22 -07:00
parent 7f6ba5534f
commit 57a37fcc20
+1 -1
View File
@@ -331,7 +331,7 @@ var $$AnimateQueueProvider = ['$animateProvider', function($animateProvider) {
var isStructural = ['enter', 'move', 'leave'].indexOf(event) >= 0;
var documentHidden = $document[0].hidden;
var documentHidden = animationsEnabled && $document[0].hidden;
// this is a hard disable of all animations for the application or on
// the element itself, therefore there is no need to continue further