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.

Aborted JSONP request prints an error in the console #5615

Closed
@arty-name

Description

@arty-name

When you cancel a JSONP request, angular deletes the callback for it. However the script still executes, and since the callback is now deleted and undefined, the script throws an exception visible in the console. Here's a demo of what happens: http://plnkr.co/edit/AlFoOUQ5P6sTgfb4SE0A?p=preview

The quick fix for this would be not to delete the callback, but replace it with angular.noop. The PR with this change is on the way.

The better fix would be to investigate why the script executes even after being removed from DOM and tell him not to.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions