-
Notifications
You must be signed in to change notification settings - Fork 27.5k
fix(ngAnimate): remove prepare classes with multiple structural anima… #16681
Conversation
extraClasses = (extraClasses ? (extraClasses + ' ') : '') + NG_ANIMATE_CLASSNAME; | ||
var cacheKey = $$animateCache.cacheKey(node, event, extraClasses, options.removeClass); | ||
var cacheKey = $$animateCache.cacheKey(element[0], animationEntry.event, extraClasses, options.removeClass); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AFAICT, element
could also be a DOM node (in which case element[0]
will be undefined), no?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As far as I can see, at this point it's already normalized to be a DOM node
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, looking at it again, it seems that element
is treated as a jqLite/jQuery element. So, it's fine.
test/ngAnimate/integrationSpec.js
Outdated
module('ngAnimateMock'); | ||
inject(function($animate, $compile, $rootScope, $rootElement, $document, $$animateCache) { | ||
element = jqLite( | ||
// Class animation pn parent element is neeeded so the child elements get the prepare class |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pn --> on (?)
test/ngAnimate/integrationSpec.js
Outdated
|
||
$compile(element)($rootScope); | ||
// $rootScope.cond = false; | ||
// $rootScope.$digest(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cough, cough
Sorry for answering late (had a week off). Thanks for refining and merging this issue @Narretz. |
…tions
Closes #16677
What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
What is the current behavior? (You can also link to an open issue here)
What is the new behavior (if this is a feature change)?
Does this PR introduce a breaking change?
Please check if the PR fulfills these requirements
Other information: