Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closing Sweet Alert modal (Alerts.alert) sometimes throws error #1537

Closed
spencern opened this issue Oct 28, 2016 · 0 comments
Closed

Closing Sweet Alert modal (Alerts.alert) sometimes throws error #1537

spencern opened this issue Oct 28, 2016 · 0 comments
Assignees

Comments

@spencern
Copy link
Contributor

Expected behavior

Not to have client errors when closing Alert boxes.

Actual Behavior

When using a SweetAlert2 modal, closing it sometimes throws an error.
If closing by clicking on the 'overlay' the error looks like
Uncaught (in promise) overlay
image

If closing by timing out (use of timer setting such as timer: 2500):
Uncaught (in promise) timer

Steps to Reproduce the Behavior

Create an Alert with settings similar to the following

Alerts.alert({
                title: "Nice!",
                text: "Testing!",
                type: "success",
                timer: 2500,
                showCancelButton: true,
              }, function () {
                console.log("confirmed!");
              });

Click outside of the alert card to dismiss it or allow the timer to dismiss the alert and you should see an error in the console.

This appears to be a known issue
sweetalert2/sweetalert2#177

PR on the way.

@spencern spencern self-assigned this Oct 28, 2016
spencern added a commit to spencern/reaction that referenced this issue Oct 28, 2016
aaronjudd pushed a commit that referenced this issue Nov 1, 2016
* Fixes #1537 - Alerts throwing error
* catch errors thrown with lodash noop

See sweetalert2/sweetalert2#177

* Don't blind catch sweet alert errors.
@ghost ghost removed the review label Nov 3, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant