mirror of
https://github.com/CaiJimmy/hugo-theme-stack.git
synced 2025-04-28 19:43:31 +08:00
fix: check if DISQUS exists before execute DISQUS.reset
This commit is contained in:
parent
5533589ace
commit
4f00b2f76c
@ -13,8 +13,10 @@
|
||||
|
||||
<script>
|
||||
window.addEventListener('onColorSchemeChange', (e) => {
|
||||
DISQUS.reset({
|
||||
reload: true
|
||||
});
|
||||
if (DISQUS) {
|
||||
DISQUS.reset({
|
||||
reload: true
|
||||
});
|
||||
}
|
||||
})
|
||||
</script>
|
Loading…
Reference in New Issue
Block a user