vue-sweetalert2
vue-sweetalert2 copied to clipboard
Uncaught TypeError: elem.cloneNode is not a function
2vendors.app.js:43192 Uncaught TypeError: elem.cloneNode is not a function at handleJqueryElem (vendors.app.js:43192) at parseHtmlToContainer (vendors.app.js:43178) at renderTitle (vendors.app.js:43706) at renderHeader (vendors.app.js:43728) at render (vendors.app.js:43768) at MixinSwal._main (vendors.app.js:45227) at MixinSwal._main (vendors.app.js:43843) at MixinSwal.SweetAlert (vendors.app.js:45412) at new MixinSwal (vendors.app.js:43837) at Function.fire (vendors.app.js:43807)
It could crash whole vue app. Happens when the route changes but vue triggers update at that time and sweetalert triggers. and this error
I have failed to ozprospect error. You can read more, what were you doing?
If sweetalert triggered when the page is changing this error will happen. let say we have global error handler on api that triggers sweetalert. And we have page with queries. Then we do logout and router.push to index page. And hence error. Vue will reevaluate query to api after logout and during router.push, before new page loaded. And it will trigger vue.sweetaalert and it will fail with the error above
This happened to me when I accidentally passed an Array/Object as a parameter to the message. Now I'm being careful.
swal({
message: Array
})