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.

ngAnimate cause errors after updating to 1.3 (Cannot read property 'parentNode' of undefined) #10205

Closed
@hamfastgamgee

Description

@hamfastgamgee

I think the guy who filed #9953 gave up too easily. :) I'm seeing the same error message in Angular 1.3. I'm using a modified version of the angular-ui bootstrap datepicker that uses ng-if to only render the control if it is open, and so I'm reasonably certain the analysis by @caitp in that issue is exactly the problem for me. If I add the following at line 1201 in angular-animate.js after the call to extractElementNode(), the error message goes away:

if (!elementNode) {
    done();
    return;
}

There's also a comment by @matsko there about refactoring some code into animationsDisabled() after #8092 is fixed, which it now is, so I'm not sure if there's some more work to be done in that area.

I have not noticed any consequences to this, since presumably we can't do much to animate a DOM element that isn't there...

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions