ok
This commit is contained in:
@@ -144,9 +144,11 @@ export default function Invoice({ table, sendParam, deviceType, socket }) {
|
||||
console.log(localStorage.getItem('cart'))
|
||||
console.log(cartItems)
|
||||
|
||||
if(localStorage.getItem('cart') == "[]") return;
|
||||
|
||||
// Parse the local storage cart
|
||||
const localStorageCart = JSON.parse(localStorage.getItem('cart'));
|
||||
|
||||
console.log(localStorageCart)
|
||||
// Create a set of itemIds from the local storage cart for quick lookup
|
||||
const localStorageItemIds = new Set(localStorageCart[0].items.map(item => item.itemId));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user