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

github.com/reuixiy/hugo-theme-meme.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorimzy <gmzhaoyang@gmail.com>2021-04-15 16:36:39 +0300
committerGitHub <noreply@github.com>2021-04-15 16:36:39 +0300
commitc2d220042cd0bc974f10c6b3880877fb27f33027 (patch)
treeb1517df58f66629976c84d42fd82bbe1e21b13e1
parent29e472630bfe632299cb595e432acce179b644f8 (diff)
fix: undefined loadComments() in homepage (#326)
-rw-r--r--assets/js/comments.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/assets/js/comments.js b/assets/js/comments.js
index fa44f9e..e8ba96e 100644
--- a/assets/js/comments.js
+++ b/assets/js/comments.js
@@ -1,6 +1,8 @@
window.addEventListener("DOMContentLoaded", event => {
{{ if .Site.Params.autoLoadComments }}
- loadComments()
+ if (typeof loadComments === 'function') {
+ loadComments()
+ }
{{ else }}
const commentsToggle = document.getElementById('load-comments');