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

Commit

Permalink
fix($animator): avoid completing the animation asynchronously unless …
Browse files Browse the repository at this point in the history
…CSS transtiions/animations are present

Closes #4023
Closes #3940
  • Loading branch information
matsko committed Oct 1, 2013
1 parent 0d0330a commit 2a63dfa
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 1 addition & 1 deletion src/ngAnimate/animate.js
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,7 @@ angular.module('ngAnimate', ['ng'])
//avoid calling done() since there is no need to remove any
//data or className values since this happens earlier than that
//and also use a timeout so that it won't be asynchronous
$timeout(onComplete || noop, 0, false);
onComplete && onComplete();
return;
}

Expand Down
2 changes: 0 additions & 2 deletions test/ngAnimate/animateSpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -503,7 +503,6 @@ describe("ngAnimate", function() {
element.addClass('ng-hide');
expect(element).toBeHidden();
$animate.removeClass(element, 'ng-hide');
$timeout.flush();
expect(element).toBeShown();
}));

Expand Down Expand Up @@ -554,7 +553,6 @@ describe("ngAnimate", function() {
element.addClass('ng-hide');
expect(element).toBeHidden();
$animate.removeClass(element, 'ng-hide');
$timeout.flush();
expect(element).toBeShown();

$animate.enabled(true);
Expand Down

0 comments on commit 2a63dfa

Please sign in to comment.