mirror of
https://github.com/Fluffy-Bean/TastyBites.git
synced 2025-06-02 08:23:14 +00:00
Fix some errors after cart refactor
This commit is contained in:
parent
7066cc492b
commit
7f7fa3b3ab
2 changed files with 10 additions and 1 deletions
|
@ -42,6 +42,13 @@ function createCartStore() {
|
|||
)
|
||||
});
|
||||
}
|
||||
|
||||
cart.update((cart: Record<string, CartItem>) => {
|
||||
if (cart[uuid].amount <= 0) {
|
||||
delete cart[uuid];
|
||||
}
|
||||
return cart;
|
||||
})
|
||||
}
|
||||
|
||||
function getEntries(): [string, CartItem][] {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue