大佬,请问报错这个是咋回事?
opened this issue · comments
大佬,请教个问题,就是我在访问/tags页面的时候就报如下错误,发现page.posts是undefined的,网上找了好久没看到解决办法,请问怎么解决呢?谢谢
Unhandled rejection TypeError: D:\blog\themes\xoxo\layout\tag.ejs:4
2| <div class="page tag-page" id="tag">
3| <h3 title="<%=page.tag%>涓嬬殑鏂囩珷"><%=page.tag%></h3>
>> 4| <% page.posts.each(function(article) { %>
5| <div class="tag-item">
6| <% if (article.link) { %>
7| <a href="https://github.com/KevinOfNeu/hexo-theme-xoxo/issues/<%=url_for(article.link)%>" target="_blank" rel="nofollow" target="_blank">
Cannot read property 'each' of undefined
at eval (eval at compile (D:\blog\node_modules\ejs\lib\ejs.js:1:1), <anonymous>:14:19)
at returnedFn (D:\blog\node_modules\ejs\lib\ejs.js:653:17)
at Theme._View.View._compiled (D:\blog\node_modules\hexo\lib\theme\view.js:123:48)
at Theme._View.View.View.render (D:\blog\node_modules\hexo\lib\theme\view.js:29:15)
at D:\blog\node_modules\hexo\lib\hexo\index.js:349:21
at tryCatcher (D:\blog\node_modules\bluebird\js\release\util.js:16:23)
at D:\blog\node_modules\bluebird\js\release\method.js:15:34
at RouteStream._read (D:\blog\node_modules\hexo\lib\hexo\router.js:123:3)
at RouteStream.Readable.read (_stream_readable.js:459:10)
at resume_ (_stream_readable.js:948:12)
at processTicksAndRejections (internal/process/task_queues.js:84:21)