title: Angular animate runner is undefined
body: <p>I'm having a non-critical issue with my angular app. I have a simple search field in a form, and when I press enter to submit, I get an exception in angular.js line 12007 (AngularJS v1.4.0-rc.0):</p>
  
  <pre><code>TypeError: Cannot read property 'end' of undefined 
  at VM2885 angular-animate.js:2209
  at forEach (angular.js:332)
  at closeChildAnimations (VM2885 angular-animate.js:2202)
  at queueAnimation (VM2885 angular-animate.js:2048)
  at Object.$$AnimateQueueProvider.$get.push (VM2885 angular-animate.js:1943)
  at Object.$AnimateProvider.$get.leave (angular.js:5017)
  at cleanupLastView (angular-route.js:913)
  at angular-route.js:942
  at publicLinkFn (angular.js:7199)
  at $get.boundTranscludeFn (angular.js:7345)
  </code></pre>
  
  <p>The reason for this is the closeChildAnimations function in angular-animate.js:</p>
  
  <pre><code>function closeChildAnimations(element) {
    var node = element[0];
    var children = node.querySelectorAll('[' + NG_ANIMATE_ATTR_NAME + ']');
    forEach(children, function(child) {
      var state = parseInt(child.getAttribute(NG_ANIMATE_ATTR_NAME));
      var animationDetails = activeAnimationsLookup.get(child);
      switch (state) {
          case RUNNING_STATE:
            //HACK: Added check here as it breaks on form submit on the search page otherwise
          if(animationDetails.runner !== undefined)
            animationDetails.runner.end();
          /* falls through */
        case PRE_DIGEST_STATE:
          if (animationDetails) {
            activeAnimationsLookup.remove(child);
          }
          break;
      }
    });
  }
  </code></pre>
  
  <p>I have added the if statement as a temporary hack. It seems that one of the elements in the activeAnimationsLookup does not have a runner member.</p>
  
  <p>Is this something that should be reported to angular team, or am I missing something here? Adding the if statement works, but I'm not happy editing a relatively stable framework such as angular.</p>