Skip to content
Permalink
Browse files

chore($AnimateRunner): examine the document more carefully

Some internal tests were failing because the `$document[0]` value
was null. This fix ensures that the if statement surrounding that
is more careful.
  • Loading branch information
matsko committed Jan 19, 2016
1 parent c429ad8 commit a84393eadb3fef6dce5d424978e27adec296eca2
Showing with 5 additions and 1 deletion.
  1. +5 −1 src/ng/animateRunner.js
@@ -81,7 +81,11 @@ var $$AnimateRunnerFactoryProvider = function() {

this._doneCallbacks = [];
this._tick = function(fn) {
if ($document[0].hidden) {
var doc = $document[0];

// the document may not be ready or attached
// to the module for some internal tests
if (doc && doc.hidden) {
timeoutTick(fn);
} else {
rafTick(fn);

0 comments on commit a84393e

Please sign in to comment.
You can’t perform that action at this time.