Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/CaiJimmy/hugo-theme-stack.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJimmy Cai <github@jimmycai.com>2022-06-09 23:43:08 +0300
committerGitHub <noreply@github.com>2022-06-09 23:43:08 +0300
commit01eb9a4b0e01766e0116d9939f2d694d8dbcfff2 (patch)
tree513cc7d379544f9ee9705226e8d830b79fec6ad4
parent49c0a2bc56737c2f6dff15aea10f85b1cd171682 (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.html2
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
});