no item.name if not productData
This commit is contained in:
parent
842f694ff0
commit
18cbc44656
1 changed files with 1 additions and 1 deletions
|
@ -79,7 +79,7 @@ module.exports = (db) => {
|
|||
} catch (err) {
|
||||
req.flash('error', err.toString());
|
||||
}
|
||||
item.name = (productData ? productData.name : req.body.itemUrlOrName);
|
||||
item.name = (productData ? productData.name : '');
|
||||
item.addedBy = req.user._id;
|
||||
item.pledgedBy = (req.user._id === req.params.user ? undefined : req.user._id);
|
||||
item.note = req.body.note;
|
||||
|
|
Loading…
Reference in a new issue