File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -96,8 +96,7 @@ export const useCart = defineStore(
96
96
97
97
const removeProductFromCart = async ( key ) => {
98
98
try {
99
- const isLastItem =
100
- cart . value . length === 1 && cart . value [ 0 ] . key === key ;
99
+ const isLastItem = cart . value . length === 1 && cart . value [ 0 ] . key === key ;
101
100
await updateCartItemQuantity ( key , 0 ) ;
102
101
if ( isLastItem ) {
103
102
updateCartState ( null ) ; // Clear cart locally to update UI instantly
@@ -133,7 +132,8 @@ export const useCart = defineStore(
133
132
return {
134
133
cart,
135
134
loading : computed (
136
- ( ) => loading . value || addToCartLoading . value || updateCartLoading . value ,
135
+ ( ) =>
136
+ loading . value || addToCartLoading . value || updateCartLoading . value ,
137
137
) ,
138
138
error,
139
139
cartTotals,
You can’t perform that action at this time.
0 commit comments