Merge pull request #5 from arings/hotfix/admin-add-new-product

Fix crash after adding new product
react_convert
Mark Moffat 2018-02-02 21:31:24 +01:00 committed by GitHub
commit cbb1e87851
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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)