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

Commit bc5c234

Browse files
committed
fixup! perf(ngAnimate): avoid repeated calls to addClass/removeClass when animation has no duration
1 parent a8a9938 commit bc5c234

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/ngAnimate/animation.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ var $$AnimationProvider = ['$animateProvider', /** @this */ function($animatePro
248248
finalAnimations[i][j] = entry.fn;
249249

250250
// the first row of elements shouldn't have a prepare-class added to them
251-
// since the elements are at the top of the animation hierarcy and they
251+
// since the elements are at the top of the animation hierarchy and they
252252
// will be applied without a RAF having to pass...
253253
if (i === 0) {
254254
element.removeData(PREPARE_CLASSES_KEY);

src/ngAnimate/shared.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ function applyGeneratedPreparationClasses($$jqLite, element, event, options) {
314314
}
315315
if (classes.length) {
316316
options.preparationClasses = classes;
317-
$$jqLite.addClass(element, classes);
317+
element.addClass(classes);
318318
}
319319
}
320320

test/ngAnimate/animateCacheSpec.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ describe('ngAnimate $$animateCache', function() {
7474
}));
7575

7676
describe('containsCachedAnimationWithoutDuration', function() {
77-
it('should return false if the validity of an key is false', inject(function($$animateCache) {
77+
it('should return false if the validity of a key is false', inject(function($$animateCache) {
7878
var validEntry = { someEssentialProperty: true };
7979
var invalidEntry = { someEssentialProperty: false };
8080

0 commit comments

Comments
 (0)