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

fix($animate): don't break on anchored animations without duration #14645

Conversation

gkalpak
Copy link
Member

@gkalpak gkalpak commented May 21, 2016

What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
Bug fix

What is the current behavior? (You can also link to an open issue here)
#14641

What is the new behavior (if this is a feature change)?
Anchored animations (via [ng-animate-ref]) without duration, don't break.

Does this PR introduce a breaking change?
No

Please check if the PR fulfills these requirements

Other information:
Fixes #14641

@gkalpak
Copy link
Member Author

gkalpak commented May 21, 2016

I am pretty sure there is a better way to test this. /cc @Narretz

@Narretz
Copy link
Contributor

Narretz commented May 21, 2016

What exactly don't you like about the test?

@@ -13,7 +13,7 @@ describe("animations", function() {
};
}));

afterEach(inject(function($$jqLite) {
afterEach(inject(function() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is going on here? Do we actually need an inject call at all?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess we don't 😃 I missed it.

@petebacondarwin
Copy link
Contributor

LGTM

petebacondarwin pushed a commit that referenced this pull request May 22, 2016
If the `from` element of an animation does not actually have an animation
then there will be no animation runner on that element. This is possible
if the element has the `ng-animate-ref` attribute but does not have any
CSS animations or transitions defined.

In this case, it is not necessary to try to update the host of the
non-existent runner.

Fixes #14641
Closes #14645
@gkalpak gkalpak deleted the fix-animate-non-animated-removed-elements branch May 23, 2016 21:19
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ng-animate 1.5.5 - ng-animate-ref - Cannot read property 'setHost' of undefined (angular-animate.js:3246)
4 participants