fix(template): remove null-checking for post.prev.title

This commit is contained in:
Ming Di Leom 2022-04-05 06:01:28 +00:00
parent b687cd6666
commit f56b7c176c
No known key found for this signature in database
GPG Key ID: 32D3E28E96A695E8
2 changed files with 23 additions and 29 deletions

View File

@ -4,13 +4,7 @@
<% if (post.prev) { %> <% if (post.prev) { %>
<strong><%= __('newer') %></strong> <strong><%= __('newer') %></strong>
<a href="<%- url_for(post.prev.path) %>"> <a href="<%- url_for(post.prev.path) %>">
<div class="article-nav-title"> <div class="article-nav-title"><%= post.prev.title %></div>
<% if (post.prev.title) { %>
<%= post.prev.title %>
<% } else { %>
(no title)
<% } %>
</div>
</a> </a>
<% } %> <% } %>
</span> </span>