disqus-wordpress-plugin icon indicating copy to clipboard operation
disqus-wordpress-plugin copied to clipboard

Uncaught TypeError:

Open tannermann opened this issue 3 years ago • 0 comments

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:

  1. Visit any page on this site without a #disqus_thread element: https://www.specialolympicswisconsin.org/
  2. 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/

tannermann avatar Mar 06 '21 04:03 tannermann