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
@ -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 New Issue
Block a user