In some modules, I call swal.close() in case there are any left over, which worked in v1, but now:
Uncaught TypeError: Cannot read property 'value' of undefined
at Function.e.onAction [as close] (lib.min.js:606)
at
This error goes away as soon as a sweet alert was once on screen.
To reproduce, open https://sweetalert.js.org/ and devtools and type swal.close();
Not sure why his was closed, i just spent over an hour trying to find out why parsley wasn't preventing form submission, when i should have checked the console for exceptions, ill blame a lack of sleep last night for the fact it took me so long to find it.
I've put a check around my call but i think .close() should be safe to call regardless of if it had been shown previously.
Yeah, I'm not sure why it was closed either.
Found the same problem.
I haven't studied the entire project yet but I discovered where the bug lives
I'll try opening a PR in the future
Most helpful comment
Not sure why his was closed, i just spent over an hour trying to find out why parsley wasn't preventing form submission, when i should have checked the console for exceptions, ill blame a lack of sleep last night for the fact it took me so long to find it.
I've put a check around my call but i think .close() should be safe to call regardless of if it had been shown previously.