diff --git a/front/src/lib/cart.ts b/front/src/lib/cart.ts index 5820c44..fe3728a 100644 --- a/front/src/lib/cart.ts +++ b/front/src/lib/cart.ts @@ -25,7 +25,7 @@ function createCartStore() { async function addToCart(uuid: string, amount: number) { if (get(cart)[uuid] !== undefined) { cart.update((cart: Record) => { - cart[uuid].amount += amount; // skipcq: JS-0320 + cart[uuid].amount += amount; return cart; }); } else { @@ -63,7 +63,7 @@ function createCartStore() { } function getTotalPrice(): number { - let totalCartPrice: number = 0; + let totalCartPrice = 0; Object.values(get(cart)).forEach((item: CartItem) => { totalCartPrice += item.amount * item.data.price; }); @@ -72,7 +72,7 @@ function createCartStore() { function removeByUUID(uuid: string) { cart.update((cart) => { - delete cart[uuid]; + delete cart[uuid]; // skipcq: JS-0320 return cart; }); }