Merge pull request #5 from arings/hotfix/admin-add-new-product
Fix crash after adding new productreact_convert
commit
cbb1e87851
|
@ -410,7 +410,7 @@ router.post('/product/insert', common.restrict, (req, res) => {
|
|||
res.redirect('/admin/product/new');
|
||||
}else{
|
||||
// get the new ID
|
||||
let newId = newDoc.insertedIds;
|
||||
let newId = newDoc.insertedIds[0];
|
||||
|
||||
// add to lunr index
|
||||
common.indexProducts(req.app)
|
||||
|
|
Loading…
Reference in New Issue