diff --git a/src/stores/user.ts b/src/stores/user.ts index e791c51..8e810db 100644 --- a/src/stores/user.ts +++ b/src/stores/user.ts @@ -278,7 +278,7 @@ export const sendUserData = async () => { export const addTariffToCart = async (tariffId: string) => { const [patchCartResponse, patchCartError] = await patchCart(tariffId); - if (patchCartError !== undefined) { + if (patchCartError === undefined) { setCart(patchCartResponse); } return({patchCartResponse, patchCartError})