TypeError: /usr/src/app/views/mixins/menupost.pug:162
160| .title
161| h1=post.title
> 162| p.time.text-capitalize= moment(post.createdAt).format('dddd, DD/MM/YYYY H:mm') + " - " + post.createdBy ? post.createdBy.lastName : ''
163| | - #[i.fa.fa-eye] #{post.viewCount}
164| .desc!=post.content
165| .socical.col-xs-12
Cannot read property 'lastName' of null
at Object.pug_interp [as postDetail] (eval at wrap (/usr/src/app/node_modules/pug-runtime/wrap.js:6:10), <anonymous>:744:154)
at eval (eval at wrap (/usr/src/app/node_modules/pug-runtime/wrap.js:6:10), <anonymous>:1523:25)
at template (eval at wrap (/usr/src/app/node_modules/pug-runtime/wrap.js:6:10), <anonymous>:2367:72)
at Object.exports.renderFile (/usr/src/app/node_modules/pug/lib/index.js:427:38)
at Object.exports.renderFile (/usr/src/app/node_modules/pug/lib/index.js:417:21)
at View.exports.__express [as engine] (/usr/src/app/node_modules/pug/lib/index.js:464:11)
at View.render (/usr/src/app/node_modules/express/lib/view.js:135:8)
at tryRender (/usr/src/app/node_modules/express/lib/application.js:640:10)
at Function.render (/usr/src/app/node_modules/express/lib/application.js:592:3)
at ServerResponse.render (/usr/src/app/node_modules/express/lib/response.js:1012:7)
at ServerResponse.res.render (/usr/src/app/api/bootstrap.js:104:16)
at RenderService.render (/usr/src/app/api/services/RenderService.js:28:17)
at /usr/src/app/api/controllers/PostController.js:168:26
at /usr/src/app/node_modules/async/dist/async.js:473:16
at iteratorCallback (/usr/src/app/node_modules/async/dist/async.js:1064:13)
at /usr/src/app/node_modules/async/dist/async.js:969:16