ktquez / vue-disqus

Integrate Disqus count and comments in your application Vue 3, with support for SPA
https://ktquez.github.io/vue-disqus/
MIT License
253 stars 26 forks source link

Prevent Disqus section from being embedded on the page when vue-disqus component isn't currently rendered on the page #30

Closed Arkeetina closed 5 years ago

Arkeetina commented 5 years ago

I am having the following issue, there are several sections in my app, which you can switch from via menu, one of them being Disqus comment section.

When I quickly switch from this comment section to any other section, there is no 'container' for disqus being embed to, and it throws the following error: Uncaught TypeError: Cannot read property 'appendChild' of null embed.js:35 From what I am seeing now in vue-disqus.vue, there is no check for container element existing on the page, so I assume that might be the issue for this error being thrown.

If I am being wrong, how can I fix it?

ktquez commented 5 years ago

I will do some tests.

ktquez commented 5 years ago

@Arkeetina Did you try to match it with v-if?

Arkeetina commented 5 years ago

@ktquez looks like no, and like something I should have tried. Thank you!

jjoek commented 5 years ago

@ktquez use v-if to check for what exactly. Because I am also getting same comments on all posts yet there is a unique identifier and unique url which actually update upon each page load.

oezkancodes commented 3 years ago

I am having the following issue, there are several sections in my app, which you can switch from via menu, one of them being Disqus comment section.

When I quickly switch from this comment section to any other section, there is no 'container' for disqus being embed to, and it throws the following error: Uncaught TypeError: Cannot read property 'appendChild' of null embed.js:35 From what I am seeing now in vue-disqus.vue, there is no check for container element existing on the page, so I assume that might be the issue for this error being thrown.

If I am being wrong, how can I fix it?

This issue is still not solved. I get the same error.

Current solution: set prop :lazy="false"