move from SQLite to MariaDB
This commit is contained in:
+1
-1
@@ -699,7 +699,7 @@ function getCartItemCount(itemId) {
|
||||
|
||||
//check if item can be added to cart (if item_stock > cart_item_count)
|
||||
async function canAddToCart(itemId) {
|
||||
const item_stock = await getItemStock(itemId);
|
||||
const item_stock = (await getItemStock(itemId)) || 0;
|
||||
const cart_item_count = getCartItemCount(itemId);
|
||||
return item_stock > cart_item_count;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user