Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit 57a37fc

Browse files
committed
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.
1 parent 7f6ba55 commit 57a37fc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/ngAnimate/animateQueue.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,7 @@ var $$AnimateQueueProvider = ['$animateProvider', function($animateProvider) {
331331

332332
var isStructural = ['enter', 'move', 'leave'].indexOf(event) >= 0;
333333

334-
var documentHidden = $document[0].hidden;
334+
var documentHidden = animationsEnabled && $document[0].hidden;
335335

336336
// this is a hard disable of all animations for the application or on
337337
// the element itself, therefore there is no need to continue further

0 commit comments

Comments
 (0)