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

Animations: animation code is executed for Comment Nodes, throwing exceptions #5021

@ZissisT

Description

@ZissisT

Hello,

in angular-animate.js:

animateSetup() method and animateRun() method do not check if current node is an Element Node and try to apply styles there, throwing exceptions (no style attribute to set style property). This happens on Comment Nodes (e.g. nodes that were commented out by ng-if ). A fix was added in 1.2 for the same issue in cancelChildAnimations() but I guess it's needed in the other 2 methods as well (issue found in latest 1.2.1 version stable version)

The fix was

    var node = element[0];
    if(node.nodeType != ELEMENT_NODE) {
      return;
    }

in the beginning of every method

Zissis

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions