mirror of
https://github.com/CaiJimmy/hugo-theme-stack.git
synced 2024-11-27 12:03:49 +01:00
fix: check if DISQUS is loaded before accessing it (#626)
closes https://github.com/CaiJimmy/hugo-theme-stack/issues/571
This commit is contained in:
parent
49c0a2bc56
commit
01eb9a4b0e
1 changed files with 1 additions and 1 deletions
|
@ -13,7 +13,7 @@
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
window.addEventListener('onColorSchemeChange', (e) => {
|
window.addEventListener('onColorSchemeChange', (e) => {
|
||||||
if (DISQUS) {
|
if (typeof DISQUS == 'object') {
|
||||||
DISQUS.reset({
|
DISQUS.reset({
|
||||||
reload: true
|
reload: true
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue