Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit 2759788

Browse files
committed
perf($animate): do not retrieve className unless classNameFilter is used
1 parent c643323 commit 2759788

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/ngAnimate/animateQueue.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,8 @@ var $$AnimateQueueProvider = ['$animateProvider', /** @this */ function($animate
165165
var classNameFilter = $animateProvider.classNameFilter();
166166
var isAnimatableClassName = !classNameFilter
167167
? function() { return true; }
168-
: function(className) {
168+
: function(node, options) {
169+
var className = [node.getAttribute('class'), options.addClass, options.removeClass].join(' ');
169170
return classNameFilter.test(className);
170171
};
171172

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

356-
var className = [node.getAttribute('class'), options.addClass, options.removeClass].join(' ');
357-
if (!isAnimatableClassName(className)) {
357+
if (!isAnimatableClassName(node, options)) {
358358
close();
359359
return runner;
360360
}

0 commit comments

Comments
 (0)