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

Commit ee587cc

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

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

@@ -359,8 +360,7 @@ var $$AnimateQueueProvider = ['$animateProvider', /** @this */ function($animate
359360
return runner;
360361
}
361362

362-
var className = [node.getAttribute('class'), options.addClass, options.removeClass].join(' ');
363-
if (!isAnimatableClassName(className)) {
363+
if (!isAnimatableClassName(node, options)) {
364364
close();
365365
return runner;
366366
}

0 commit comments

Comments
 (0)