Skip to content

Commit

Permalink
fix recommendation error
Browse files Browse the repository at this point in the history
  • Loading branch information
jairad26 committed Sep 26, 2024
1 parent 17663ab commit a952bd8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion backend/functions/assembly/search.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export function recommendProductByCart(
);

const cart = getCart(cartId);
if (cart === null) {
if (cart === null || cart.items.length === 0) {
productSearchRes.status = "error";
productSearchRes.error = "Cart not found";
return productSearchRes;
Expand Down

0 comments on commit a952bd8

Please sign in to comment.