Closed DougKeller closed 5 years ago
TL;DR: If the location changes while waiting on an async operation before closing a modal, the cleanUpClose function is invoked multiple times, resulting in an exception:
cleanUpClose
TypeError: Cannot read property 'resolve' of null (line 206 of angular-modal-service.js)
Steps to Reproduce
// ModalController $http.post('something').then(() => { close(); });
$location.path('/some-other-url');
$http.post
close
TL;DR: If the location changes while waiting on an async operation before closing a modal, the
cleanUpClose
function is invoked multiple times, resulting in an exception:Steps to Reproduce
$http.post
promise is resolved, causingclose
to be called