TypeError: /usr/src/app/views/mixins/product.pug:2
1| mixin product(product, coupons)
> 2| - var minPrice = product.minPrice || {}
3| - var price = minPrice.price || 0
4| - var salePrice = minPrice.salePrice || 0
5| - var displaySalePrice = (salePrice || price) ? numeral(salePrice || price).format() + 'đ' : 'Liên hệ'
Cannot read property 'minPrice' of undefined
at Object.pug_interp [as product] (eval at wrap (/usr/src/app/node_modules/pug-runtime/wrap.js:6:10), <anonymous>:1009:24)
at eval (eval at wrap (/usr/src/app/node_modules/pug-runtime/wrap.js:6:10), <anonymous>:2093:22)
at eval (eval at wrap (/usr/src/app/node_modules/pug-runtime/wrap.js:6:10), <anonymous>:2104:4)
at eval (eval at wrap (/usr/src/app/node_modules/pug-runtime/wrap.js:6:10), <anonymous>:2148:4)
at template (eval at wrap (/usr/src/app/node_modules/pug-runtime/wrap.js:6:10), <anonymous>:2969: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 ProductService.getProducts (/usr/src/app/api/controllers/PromotionController.js:45:20)
at /usr/src/app/api/services/ProductService.js:122:5