Skip to content

Commit

Permalink
fix: keep both cart items with the same currencies
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew-Orlov committed Dec 24, 2024
1 parent 46afe22 commit 2f6eb32
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions client-app/shared/account/composables/useSignMeIn.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,12 @@ export function useSignMeIn() {

if (me.value?.me && currencyCode) {
if (cart.value?.id) {
await clearCurrencyCart({
command: { userId: me.value.me.id, currencyCode: currentCurencyCode },
skipQuery: false,
});
if (currencyCode !== currentCurencyCode) {
await clearCurrencyCart({
command: { userId: me.value.me.id, currencyCode: currentCurencyCode },
skipQuery: false,
});
}

await mergeCart({ command: { userId: me.value.me.id, secondCartId: cart.value.id } });

Expand Down

0 comments on commit 2f6eb32

Please sign in to comment.