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

Uncaught TypeError: elem.cloneNode is not a function #74

Open
aldarund opened this issue Oct 1, 2019 · 4 comments
Open

Uncaught TypeError: elem.cloneNode is not a function #74

aldarund opened this issue Oct 1, 2019 · 4 comments

Comments

@aldarund
Copy link

aldarund commented Oct 1, 2019

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

@avil13
Copy link
Owner

avil13 commented Oct 1, 2019

I have failed to ozprospect error. You can read more, what were you doing?

@aldarund
Copy link
Author

aldarund commented Oct 1, 2019

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

@vincentdh
Copy link
Contributor

Hi @aldarund ,

Can you provide a code sample with codesandbox.io.

Thanks.

@vluzrmos
Copy link

vluzrmos commented Nov 14, 2020

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
})

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

4 participants