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

fix($animate): ensure no transitions are applied when an empty inline style object is provided #10770

Closed
wants to merge 1 commit into from

Conversation

matsko
Copy link
Contributor

@matsko matsko commented Jan 16, 2015

Closes #10613

@@ -1869,7 +1869,7 @@ angular.module('ngAnimate', ['ng'])
return;
}

if (!staggerTime && styles) {
if (!staggerTime && styles && Object.keys(styles).length > 0) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Is it possible that styles could be a string? If so then calling Object.keys would throw an exception.

Copy link
Contributor

Choose a reason for hiding this comment

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

Oh I think it cannot since in $animate.animate(element, from, to, ...) from and to are both supposed to be objects.

@petebacondarwin
Copy link
Contributor

LGTM

matsko added a commit that referenced this pull request Jan 19, 2015
@matsko matsko closed this in 0db5b21 Jan 19, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

animate.css animation within angularjs 1.3 using ngAnimate gives different animations in Firefox
3 participants