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

fix($animator): avoid completing the animation asynchronously unless CSS transtiions/animations are present #4213

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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