In this testcase, view-timeline-range-update-reversed-animation.html, it
assumes there is an animation there. However, Gecko doesn't support
`animation-duration:auto` (which is defined in CSS Animations 2), so
getAnimations() may not return the animation (which uses the initial
animation-duration value, 0s, instead).
We have to add this error handle to avoid the js error which causes timeout.
Differential Revision: https://phabricator.services.mozilla.com/D217483