From 55e1b105865778fa9f50f368f560d62b924f71b0 Mon Sep 17 00:00:00 2001 From: josephperrott Date: Thu, 10 Dec 2015 17:48:37 -0800 Subject: [PATCH] Update animateCss.js to not remove events from elements animateCss currently removes all events from and element during close(). We should check if any animationend events have occured by checking the length of the events array, rather than its truthiness. --- src/ngAnimate/animateCss.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ngAnimate/animateCss.js b/src/ngAnimate/animateCss.js index 1039db3425df..edff35f97fdb 100644 --- a/src/ngAnimate/animateCss.js +++ b/src/ngAnimate/animateCss.js @@ -750,7 +750,7 @@ var $AnimateCssProvider = ['$animateProvider', function($animateProvider) { } // Remove the transitionend / animationend listener(s) - if (events) { + if (events && events.length) { element.off(events.join(' '), onAnimationProgress); }