Skip to content

Commit fb11d90

Browse files
committed
There is no return statement
There is no return statement if productId === item.productId is false. Are you sure this is correct? If so, consider adding return; explicitly.
1 parent b1af33e commit fb11d90

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

utils/functions/functions.js

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

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

0 commit comments

Comments
 (0)