Skip to content

Commit

Permalink
🐛 修复未指定评论插件的判断 #847
Browse files Browse the repository at this point in the history
  • Loading branch information
zkqiang committed Oct 7, 2022
1 parent d5797b6 commit 80d88b0
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions layout/_partials/comments.ejs
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
<% if ((!is_post() && !is_page()) || (is_post() && theme.post.comments.enable && page.comments) || (is_page() && page.comments)) { %>
<article id="comments">
<%- partial('_partials/comments/' + (typeof page.comment === 'string' && page.comment !== '' ? page.comment : theme.post.comments.type)) %>
</article>
<% var commentType = typeof page.comment === 'string' && page.comment !== '' ? page.comment : theme.post.comments.type %>
<% if (commentType) { %>
<article id="comments">
<%- partial('_partials/comments/' + commentType) %>
</article>
<% } %>
<% } %>

0 comments on commit 80d88b0

Please sign in to comment.