Skip to content

Commit 7c846db

Browse files
authored
Merge pull request #332 from w3bdesign/develop
Fix else is not necessary here
2 parents 6b21969 + e9a1e7d commit 7c846db

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

utils/functions/functions.js

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -112,14 +112,13 @@ export const getUpdatedProducts = (
112112
);
113113

114114
return updatedProducts;
115-
} else {
116-
// If product not found push the new product to the existing product array.
117-
let productPrice = getFloatVal(product.price);
118-
const newProduct = createNewProduct(product, productPrice, qtyToBeAdded);
119-
existingProductsInCart.push(newProduct);
120-
121-
return existingProductsInCart;
122115
}
116+
// If product not found push the new product to the existing product array.
117+
let productPrice = getFloatVal(product.price);
118+
const newProduct = createNewProduct(product, productPrice, qtyToBeAdded);
119+
existingProductsInCart.push(newProduct);
120+
121+
return existingProductsInCart;
123122
};
124123

125124
/**

0 commit comments

Comments
 (0)