-
Notifications
You must be signed in to change notification settings - Fork 328
post.categories.map is not a function #290
Description
ERROR /Users/zhaoqi/blog/themes/hueman/layout/page.ejs:1
1| <%- partial('common/article', { post: page }) %>
/Users/zhaoqi/blog/themes/hueman/layout/common/article.ejs:28
26|
27|
28| <%- partial('post/ld_json', { post: post }) %>
29|
30| <%- partial('comment/index') %>
31|
/Users/zhaoqi/blog/themes/hueman/layout/common/post/ld_json.ejs:12
10| "image": "<%- url_for(config.url + thumbnail(post)) %>",
11| <% if (post.tags) { %>"keywords": "<%- post.tags.map(t => t.name).join(' ') %>",<% } %>
12| <% if (post.categories) { %>"genre": "<%- post.categories.map(c => c.name).join(' ') %>",<% } %>
13| "datePublished": "<%- date(post.date, 'YYYY-MM-DD') %>",
14| "dateCreated": "<%- date(post.date, 'YYYY-MM-DD') %>",
15| <% if (post.updated) { %>"dateModified": "<%- date(post.updated, 'YYYY-MM-DD') %>",<% } %>
post.categories.map is not a function
Did anyone meet this problem? It doesn't affect the site but it's annoying.