Fix potential undefined error in comment config parsing. (#303)

This commit is contained in:
2018-01-21 04:45:24 +08:00 committed by Ruipeng Zhang
parent 16aff88fe9
commit aee653f8e9
2 changed files with 4 additions and 2 deletions

View File

@ -13,7 +13,8 @@
<section id="comments"><%- partial('comment/changyan') %></section>
<% } else if (theme.comment.livere) { %>
<section id="comments"><%- partial('comment/livere') %></section>
<% } else if (theme.comment.valine.on &&
<% } else if (theme.comment.valine &&
theme.comment.valine.on &&
theme.comment.valine.appId &&
theme.comment.valine.appKey) { %>
<section id="comments"><%- partial('comment/valine') %></section>

View File

@ -18,7 +18,8 @@
<%- partial('comment/gitment', { script: true }) %>
<% } else if (theme.comment.livere) { %>
<%- partial('comment/livere', { script: true }) %>
<% } else if (theme.comment.valine.on &&
<% } else if (theme.comment.valine &&
theme.comment.valine.on &&
theme.comment.valine.appId &&
theme.comment.valine.appKey) { %>
<%- partial('comment/valine', { script: true }) %>