Skip to content
This repository has been archived by the owner on Apr 13, 2022. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
perf($animate): do not retrieve className unless classNameFilter
…is used
  • Loading branch information
gkalpak committed May 2, 2017
1 parent c643323 commit 2759788
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/ngAnimate/animateQueue.js
Expand Up @@ -165,7 +165,8 @@ var $$AnimateQueueProvider = ['$animateProvider', /** @this */ function($animate
var classNameFilter = $animateProvider.classNameFilter();
var isAnimatableClassName = !classNameFilter
? function() { return true; }
: function(className) {
: function(node, options) {
var className = [node.getAttribute('class'), options.addClass, options.removeClass].join(' ');
return classNameFilter.test(className);
};

Expand Down Expand Up @@ -353,8 +354,7 @@ var $$AnimateQueueProvider = ['$animateProvider', /** @this */ function($animate
return runner;
}

var className = [node.getAttribute('class'), options.addClass, options.removeClass].join(' ');
if (!isAnimatableClassName(className)) {
if (!isAnimatableClassName(node, options)) {
close();
return runner;
}
Expand Down

0 comments on commit 2759788

Please sign in to comment.