diff options
author | Jimmy Cai <github@jimmycai.com> | 2022-06-09 23:43:08 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-09 23:43:08 +0300 |
commit | 01eb9a4b0e01766e0116d9939f2d694d8dbcfff2 (patch) | |
tree | 513cc7d379544f9ee9705226e8d830b79fec6ad4 | |
parent | 49c0a2bc56737c2f6dff15aea10f85b1cd171682 (diff) |
fix: check if DISQUS is loaded before accessing it (#626)
closes https://github.com/CaiJimmy/hugo-theme-stack/issues/571
-rw-r--r-- | layouts/partials/comments/provider/disqus.html | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/layouts/partials/comments/provider/disqus.html b/layouts/partials/comments/provider/disqus.html index 1f283df..fb17b77 100644 --- a/layouts/partials/comments/provider/disqus.html +++ b/layouts/partials/comments/provider/disqus.html @@ -13,7 +13,7 @@ <script> window.addEventListener('onColorSchemeChange', (e) => { - if (DISQUS) { + if (typeof DISQUS == 'object') { DISQUS.reset({ reload: true }); |