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

Explicitly compare to false for isConfirm #56

Merged
merged 1 commit into from Feb 13, 2017

Conversation

tume
Copy link
Contributor

@tume tume commented Feb 8, 2017

I was running into a issue when using input inside sweetalert and user confirms the dialog without typing anything. This always triggers onCancel instead of onConfirm which at least in my mind would make more sense.

This change allows empty values ('') to flow through onConfirm callback. It seems that sweetalert is just passing false as first value for cancel event so explicitly checking for that.

@vsamiev
Copy link

vsamiev commented Feb 9, 2017

@tume thanks, yesterday late evening i was having same issue

@chentsulin chentsulin merged commit 761c44c into chentsulin:master Feb 13, 2017
@chentsulin
Copy link
Owner

It makes sense. Thanks for the PR.

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

Successfully merging this pull request may close these issues.

None yet

3 participants