Skip to content

Commit 4fa4352

Browse files
authored
Merge pull request #339 from w3bdesign/develop
Return -1 if product is not found in cart
2 parents e7ada02 + 81cdd93 commit 4fa4352

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

utils/functions/functions.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ const isProductInCart = (existingProductsInCart, productId) => {
132132
if (productId === item.productId) {
133133
return item;
134134
}
135-
return;
135+
return -1;
136136
};
137137

138138
// This new array will only contain the product which is matched.

0 commit comments

Comments
 (0)