Small typo causing bad errors

react_convert
Mark Moffat 2018-02-07 20:43:01 +01:00
parent 13173d9f97
commit d6bff8496b
1 changed files with 2 additions and 2 deletions

View File

@ -103,10 +103,10 @@ router.get('/product/:id', (req, res) => {
db.products.findOne({$or: [{_id: common.getId(req.params.id)}, {productPermalink: req.params.id}]}, (err, result) => {
// render 404 if page is not published
if(err){
res.render('error', {message: '404 - Page not found', helpers: req.handlebars.helpers});
res.render('error', {message: 'Product not found', helpers: req.handlebars.helpers});
}
if(err || result == null || result.productPublished === 'false'){
res.render('error', {message: '404 - Page not found', helpers: req.handlebars.helper});
res.render('error', {message: 'Product not found', helpers: req.handlebars.helpers});
}else{
let productOptions = {};
if(result.productOptions){