Skip to content

Commit 4e7c890

Browse files
committed
else is not necessary here
else is not necessary here since all if branches return, consider removing it to reduce nesting and make code more readable.
1 parent f5131f2 commit 4e7c890

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

utils/functions/functions.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,9 +176,8 @@ export const removeItemFromCart = (productId) => {
176176

177177
localStorage.setItem('woo-next-cart', JSON.stringify(updatedCart));
178178
return updatedCart;
179-
} else {
180-
return existingCart;
181179
}
180+
return existingCart;
182181
};
183182

184183
/**

0 commit comments

Comments
 (0)