Skip to content

Commit 06f856e

Browse files
authored
Merge pull request #334 from w3bdesign/develop
Else is not necessary here
2 parents 7c846db + 4e7c890 commit 06f856e

File tree

3 files changed

+121
-122
lines changed

3 files changed

+121
-122
lines changed

package-lock.json

Lines changed: 117 additions & 117 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "nextjs-woocommerce",
3-
"version": "1.0.9",
3+
"version": "1.0.10",
44
"description": "Nextjs WooCommerce webshop",
55
"main": "index.js",
66
"scripts": {
@@ -14,7 +14,7 @@
1414
"dependencies": {
1515
"@apollo/client": "^3.3.8",
1616
"@types/react": "^17.0.1",
17-
"algoliasearch": "^4.8.4",
17+
"algoliasearch": "^4.8.5",
1818
"autoprefixer": "^10.2.4",
1919
"graphql": "^15.5.0",
2020
"next": "^10.0.6",

utils/functions/functions.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ export const getUpdatedProducts = (
129129
* @return {number | *} Index Returns -1 if product does not exist in the array, index number otherwise
130130
*/
131131
const isProductInCart = (existingProductsInCart, productId) => {
132-
const returnItemThatExits = (item, index) => {
132+
const returnItemThatExits = (item) => {
133133
if (productId === item.productId) {
134134
return item;
135135
}
@@ -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)