From 212a40632bcf6c1dc69d782d070ac5a4036c1dc1 Mon Sep 17 00:00:00 2001 From: Mark Moffat Date: Sat, 21 Mar 2020 20:21:18 +1030 Subject: [PATCH] Stock check fixes --- routes/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/routes/index.js b/routes/index.js index 02b00e5..c3a837d 100644 --- a/routes/index.js +++ b/routes/index.js @@ -528,7 +528,7 @@ router.post('/product/addtocart', async (req, res, next) => { } // If stock management on check there is sufficient stock for this product - if(config.trackStock && product.productStock){ + if(config.trackStock){ // If there is more stock than total (ignoring held) if(productQuantity > product.productStock){ return res.status(400).json({ message: 'There is insufficient stock of this product.' });