Skip to content

Uncaught TypeError: Cannot read property '$destroy' of undefined - angular-loading-overlay.js:98 #6

@pouletfou

Description

@pouletfou

Hello

Using an overlay in a modal, when I close the modal, I get this error in the console.
Changing this segment (near line 98)
$element.on('$destroy', function () { overlayElementScope.$destroy(); unsubscribe(); });
To
$element.on('$destroy', function () { if (overlayElementScope){ overlayElementScope.$destroy(); } unsubscribe(); });

Corrects the problem.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions