disqus-wordpress-plugin
disqus-wordpress-plugin copied to clipboard
Uncaught TypeError:
Describe the bug
On pages without a #disqus_thread element, a console error appears:
Uncaught TypeError: Cannot read property 'appendChild' of null at k (embed.js:45) at Object.l [as isSerif] (embed.js:45) at h.i.toJSON (embed.js:45) at Object.c.loadEmbed [as _loadEmbed] (embed.js:47) at embed.js:47
To Reproduce
Steps to reproduce the behavior:
- Visit any page on this site without a #disqus_thread element: https://www.specialolympicswisconsin.org/
- Here is a page with a disqus thread where the error does not occur: https://www.specialolympicswisconsin.org/marquette-dental-students-video-makes-athletes-more-comfortable-at-the-dentist/
Expected behavior
A TypeError should not occur on pages without a disqus thread ID
Screenshots
https://www.dropbox.com/s/9stm55ywaunkw4y/thadd-11.png?raw=1
Specifications:
- Wordpress version: 5.6.2
- Plugin version: 3.0.21
Additional context
https://wordpress.org/support/topic/new-update-error-on-console/