Skip to content

Commit

Permalink
fix(composable): fix clearing cart on customer logout
Browse files Browse the repository at this point in the history
  • Loading branch information
bartoszherba committed Jan 20, 2022
1 parent 4cf45c9 commit 6bb1f7b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/composables/src/composables/useUser/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ CustomerCreateInput
cart: useCart(),
};
},
load: async (context: Context, params) => {
load: async (context: Context) => {
Logger.debug('[Magento] Load user information');
const apiState = context.$magento.config.state;

Expand Down Expand Up @@ -46,7 +46,7 @@ CustomerCreateInput

apiState.setCustomerToken(null);
apiState.setCartId(null);
// context.cart.setCart(null);
context.cart.setCart(null);
},
updateUser: async (context: Context, params) => {
Logger.debug('[Magento] Update user information', { params });
Expand Down

0 comments on commit 6bb1f7b

Please sign in to comment.