diff --git a/src/ng/animator.js b/src/ng/animator.js index 7f0f7b7a8d1b..a24d781cf45a 100644 --- a/src/ng/animator.js +++ b/src/ng/animator.js @@ -280,7 +280,9 @@ var $AnimatorProvider = function() { var duration = 0; //we want all the styles defined before and after forEach(element, function(element) { - var globalStyles = $window.getComputedStyle(element) || {}; + if (element.nodeType !== 1 /* ELEMENT_NODE */) return; + var globalStyles = $window.getComputedStyle(element); + if (!globalStyles) return; duration = Math.max( parseFloat(globalStyles[w3cTransitionProp + durationKey]) || parseFloat(globalStyles[vendorTransitionProp + durationKey]) ||