dwmkerr / angular-modal-service

Modal service for AngularJS - supports creating popups and modals via a service.
MIT License
626 stars 321 forks source link

Do not close a second time if close() has already been called #248

Closed swbanks closed 6 years ago

swbanks commented 6 years ago

In testing we found that when closing a modal twice (clicking save closes our modal as well as clicking outside of the modal) the deferreds we were resolving were nulled out the first time and the second time we tried to resolve them an error would be thrown.

In order to no longer receive this error, we want to prevent the cleanupClose() method from being called a second time if it was already called.

dwmkerr commented 6 years ago

@swbanks thanks for this! It looks like the PR only has the changes to the dst folder though, can you update the PR with the changes to the actual source? Then I can merge and redeploy

swbanks commented 6 years ago

@swbanks thanks for this! It looks like the PR only has the changes to the dst folder though, can you update the PR with the changes to the actual source? Then I can merge and redeploy

I will take care of this on Monday. Thanks for the reply!

dwmkerr commented 6 years ago

No worries!

swbanks commented 6 years ago

Actual source files have now been updated.

dwmkerr commented 6 years ago

Many thanks @swbanks! Will release now :)

dwmkerr commented 6 years ago

Latest version published now, thanks!