TypeError: E:\NodeJs-WORKSPACCE\LEAN\myblog\views\index.ejs:7 5| 6|
7| <% post.tags.forEach(function(tag, index){ %> 8| <% if(tag.tag){ %> 9| <%= tag.tag %> 10| <% } %>
Cannot call method ‘forEach’ of undefined
at buf.push.
.buf (eval at <anonymous> (E:\NodeJs-WORKSPACCE\LEAN\myblog\node_modules\ejs\lib
\ejs.js:236:14), <anonymous>:31:545)
at Array.forEach (native)
at eval (eval at <anonymous> (E:\NodeJs-WORKSPACCE\LEAN\myblog\node_modules
ejs\lib\ejs.js:236:14), <anonymous>:31:65)
at eval (eval at <anonymous> (E:\NodeJs-WORKSPACCE\LEAN\myblog\node_modules
ejs\lib\ejs.js:236:14), <anonymous>:35:35)
at E:\NodeJs-WORKSPACCE\LEAN\myblog\node_modules\ejs\lib\ejs.js:249:15
at Object.exports.render (E:\NodeJs-WORKSPACCE\LEAN\myblog\node_modules\ejs
lib\ejs.js:287:13)
at View.exports.renderFile [as engine] (E:\NodeJs-WORKSPACCE\LEAN\myblog\nod
e_modules\ejs\lib\ejs.js:317:20)
at View.render (E:\NodeJs-WORKSPACCE\LEAN\myblog\node_modules\express\lib\vi
ew.js:75:8)